SELECT 
  p.product_id, 
  ifnull(
    count(dp.post_id), 
    0
  ) as discussion_amount_posts 
FROM 
  netting_discussion 
  INNER JOIN netting_products as p ON (
    netting_discussion.object_id = p.product_id
  ) 
  INNER JOIN netting_discussion_posts as dp ON (
    netting_discussion.thread_id = dp.thread_id 
    AND netting_discussion.object_type = 'P'
  ) 
WHERE 
  dp.status = 'A' 
  and p.product_id in (
    295, 654, 655, 706, 707, 708, 709, 710, 
    711, 712, 713, 714, 715, 716, 717, 718, 
    719, 720, 721, 757, 758, 759, 761, 762, 
    763, 764, 765, 766, 767, 768, 769, 770, 
    771, 772, 773, 774, 775, 776
  ) 
GROUP BY 
  p.product_id

Query time 0.00049

JSON explain

{
  "query_block": {
    "select_id": 1,
    "filesort": {
      "sort_key": "p.product_id",
      "temporary_table": {
        "nested_loop": [
          {
            "table": {
              "table_name": "dp",
              "access_type": "ALL",
              "possible_keys": ["thread_id", "thread_id_2"],
              "rows": 4,
              "filtered": 100,
              "attached_condition": "dp.`status` = 'A'"
            }
          },
          {
            "table": {
              "table_name": "netting_discussion",
              "access_type": "eq_ref",
              "possible_keys": ["PRIMARY", "object_id"],
              "key": "PRIMARY",
              "key_length": "3",
              "used_key_parts": ["thread_id"],
              "ref": ["pucuda_cscart.dp.thread_id"],
              "rows": 1,
              "filtered": 100,
              "attached_condition": "netting_discussion.object_type = 'P'"
            }
          },
          {
            "table": {
              "table_name": "p",
              "access_type": "eq_ref",
              "possible_keys": ["PRIMARY"],
              "key": "PRIMARY",
              "key_length": "3",
              "used_key_parts": ["product_id"],
              "ref": ["pucuda_cscart.netting_discussion.object_id"],
              "rows": 1,
              "filtered": 100,
              "attached_condition": "p.product_id in (295,654,655,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,757,758,759,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776)",
              "using_index": true
            }
          }
        ]
      }
    }
  }
}