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 = 906 
GROUP by 
  status

Query time 0.00535

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "4021.78"
    },
    "grouping_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "1618.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_orders",
            "access_type": "ALL",
            "possible_keys": [
              "PRIMARY",
              "status"
            ],
            "rows_examined_per_scan": 1618,
            "rows_produced_per_join": 1618,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "138.58",
              "eval_cost": "323.60",
              "prefix_cost": "462.18",
              "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": 1618,
            "filtered": "100.00",
            "using_index": true,
            "cost_info": {
              "read_cost": "1618.00",
              "eval_cost": "323.60",
              "prefix_cost": "2403.78",
              "data_read_per_join": "366K"
            },
            "used_columns": [
              "order_id",
              "product_id"
            ]
          }
        }
      ]
    }
  }
}

Result

count status
12 C
2 F
39 N
19 O
3 P