How to count number of occurrences for all different values in database column and obtain 0 if are there empty result?
Use the FILTER clause

SELECT city,
       sum(quantity::integer) FILTER (WHERE type = 'Man') AS man,
       ...
FROM doors JOIN ...
GROUP BY doors.city, ...;