SELECT 
  COUNT(
    DISTINCT storefronts.storefront_id
  ) 
FROM 
  cscart_storefronts AS storefronts 
  LEFT JOIN cscart_storefronts_currencies AS currencies ON storefronts.storefront_id = currencies.storefront_id 
WHERE 
  1 = 1 
  AND (
    currencies.currency_id IN ('5')
  )

Query time 0.00089

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "storefronts",
      "access_type": "index",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "4",
      "used_key_parts": ["storefront_id"],
      "rows": 2,
      "filtered": 100,
      "using_index": true
    },
    "table": {
      "table_name": "currencies",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY", "idx_storefront_id"],
      "key": "PRIMARY",
      "key_length": "8",
      "used_key_parts": ["storefront_id", "currency_id"],
      "ref": ["devmotorsbay.storefronts.storefront_id", "const"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "storefronts.storefront_id = currencies.storefront_id",
      "using_index": true
    }
  }
}

Result

COUNT(DISTINCT storefronts.storefront_id)
2