SELECT 
  COUNT(
    DISTINCT storefronts.storefront_id
  ) 
FROM 
  cscart_storefronts AS storefronts 
WHERE 
  1 = 1

Query time 0.00041

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "storefronts",
          "access_type": "index",
          "key": "PRIMARY",
          "key_length": "4",
          "used_key_parts": ["storefront_id"],
          "rows": 2,
          "filtered": 100,
          "using_index": true
        }
      }
    ]
  }
}

Result

COUNT(DISTINCT storefronts.storefront_id)
2