you could do this using a recordset.
the following example assumes that your primary key column is named "id", your table is named "users", the location column is named "state" and it stores the state abbreviation in capitols:
SELECT COUNT(id) FROM users WHERE state = 'CA'