SELECT 
  COUNT(
    DISTINCT(
      vendor_communications.thread_id
    )
  ) 
FROM 
  cscart_vendor_communications AS vendor_communications 
  LEFT JOIN cscart_companies AS companies ON companies.company_id = vendor_communications.company_id 
  LEFT JOIN cscart_users AS users ON users.user_id = vendor_communications.user_id 
WHERE 
  1 = 1 
  AND vendor_communications.communication_type IN ('vendor_to_customer') 
  AND vendor_communications.status IN ('N')

Query time 0.00052

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "vendor_communications",
      "access_type": "ALL",
      "rows": 2,
      "filtered": 100,
      "attached_condition": "vendor_communications.communication_type = 'vendor_to_customer' and vendor_communications.`status` = 'N'"
    }
  }
}

Result

COUNT(DISTINCT(vendor_communications.thread_id))
1