# In case you want to count the no. of rows in your psql query which is using except
# let's say this is your original query
SELECT id from table1 except select id from table2;
# to get count do this
select count(*) from (SELECT id from table1 except select id from table2) temp;