SELECT 
  COUNT(
    DISTINCT(cscart_order_details.order_id)
  ) as count, 
  cscart_orders.status as status 
FROM 
  cscart_orders 
  LEFT JOIN cscart_order_details ON cscart_order_details.order_id = cscart_orders.order_id 
WHERE 
  cscart_order_details.product_id = 837 
GROUP by 
  status

Query time 0.00534

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "4009.49"
    },
    "grouping_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "1613.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_orders",
            "access_type": "ALL",
            "possible_keys": [
              "PRIMARY",
              "status"
            ],
            "rows_examined_per_scan": 1613,
            "rows_produced_per_join": 1613,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "138.29",
              "eval_cost": "322.60",
              "prefix_cost": "460.89",
              "data_read_per_join": "16M"
            },
            "used_columns": [
              "order_id",
              "status"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_order_details",
            "access_type": "ref",
            "possible_keys": [
              "o_k"
            ],
            "key": "o_k",
            "used_key_parts": [
              "order_id",
              "product_id"
            ],
            "key_length": "6",
            "ref": [
              "eshopuga_upgr_4122.cscart_orders.order_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1613,
            "filtered": "100.00",
            "using_index": true,
            "cost_info": {
              "read_cost": "1613.00",
              "eval_cost": "322.60",
              "prefix_cost": "2396.49",
              "data_read_per_join": "365K"
            },
            "used_columns": [
              "order_id",
              "product_id"
            ]
          }
        }
      ]
    }
  }
}

Result

count status
2 C
1 N