SELECT 
  a.object_id, 
  COUNT(b.post_id) as total_items 
FROM 
  cscart_discussion as a 
  LEFT JOIN cscart_discussion_posts as b ON a.thread_id = b.thread_id 
WHERE 
  a.object_type = 'M' 
  AND b.status = 'A' 
GROUP BY 
  a.object_id

Query time 0.00038

JSON explain

{
  "query_block": {
    "select_id": 1,
    "filesort": {
      "sort_key": "a.object_id",
      "temporary_table": {
        "table": {
          "table_name": "b",
          "access_type": "ALL",
          "possible_keys": ["thread_id", "thread_id_2"],
          "rows": 3,
          "filtered": 100,
          "attached_condition": "b.`status` = 'A'"
        },
        "table": {
          "table_name": "a",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["thread_id"],
          "ref": ["admin_test.b.thread_id"],
          "rows": 1,
          "filtered": 100,
          "attached_condition": "a.object_type = 'M'"
        }
      }
    }
  }
}