SELECT COUNT(*) 
FROM (SELECT   c.cust_state_province,
         SUM(amount_sold) AS dollar_sales
      FROM     sales s, customers c
      WHERE    s.cust_id= c.cust_id
      GROUP BY c.cust_state_province);