How to count multiple values of a column as one group?
Use the aggregate FILTER clause in Postgres 9.4+:

SELECT count(*) FILTER (WHERE rank = ANY ('{a,b,v}')) AS myvalues
     , count(*) FILTER (WHERE rank = ANY ('{c,d,j}')) AS yourvalues
     , count(*) FILTER (WHERE rank = 'e')             AS extravalues
FROM main;


Details and alternatives for older versions:


Return counts for multiple ranges in a single SELECT statement