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

Query time 0.00039

JSON explain

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

Result

COUNT(DISTINCT storefronts.storefront_id)
4