How can i select on distinct values multiple fields

I have a doc group of type zip which holds a zip_code, city and state and i have the need to select only distinct docs where the city and state is unique. Since my Records have a doc for each zip code there can be multiple docs for a given city and state. or example there is multiple Docs for Los Angeles
When i use the below query i still get all records
select distinct(city), state_id, county_name, zip from Contacts where _type = 'zip' and city like 'Los Ang%'

SELECT  city, state_id,   ARRAY_AGG ( DISTINCT zip_code) AS zipcodes
FROM Contacts 
WHERE _type = 'zip' and city like 'Los Ang%'
GROUP BY state_id, city;

How would i then go about to get the count of the grouped docs. When using the same group by clause and use the count(*) or count(city) it returns me the doc count of docs prior to group. So for example on Beverly Hills i have a total of 4, after group by i get 2 docs, one for CA the other for FL so i would like to get the count of 2 not of 4

SELECT  city, state_id,   ARRAY_AGG ( DISTINCT zip_code) AS zipcodes, COUNT(1) AS items
FROM Contacts 
WHERE _type = 'zip' and city like 'Los Ang%'
GROUP BY state_id, city;

If you want count number of distinct zip codes. Add COUNT (DISTINCT zip_code)

so if i use your code for the count it produces the following result

[ {   "city": "Beverly Hills",
    "items": 1,
    "state_id": "FL"  },
  {    "city": "Beverly Hills",
    "items": 3,
    "state_id": "CA"  }    ]

if i use

SELECT  COUNT(*) AS items
FROM Contacts 
WHERE _type = 'zip' and city like 'Beverly Hills%'
GROUP BY state_id, city;

i get
[ { “items”: 1 },
{ “items”: 3 }]

but what i am after is, is the actual count of items in this case it would be 2 as there a 2 items which are grouped, i dont want the count of items which are grouped together in this case 3

SELECT  COUNT( DISTINCT {state_id, city}) AS items
FROM Contacts 
WHERE _type = 'zip' and city like 'Beverly Hills%';

OR

SELECT COUNT(1) 
FROM (  your gorup query) AS t;