Count nested joined table records only if the table associated via bridge table have two records with given names
Please consider this... not a ready-made solution but a suggestion which should lead you in a proper direction.


  In the first part for contact_compliants, it has IN which means
  either one of the names for nested will increment count. which is not
  my requirement. I want to count only when when both the names matches.


Both? Then your whole idea with JOIN + count(*) will not work.

The problem is clearly visible if you replace the whole SELECT list with *:

SELECT * FROM main_table AS main
INNER JOIN bridge_table_1 AS bt_1 ON bt_1.main_table_id = main.id
INNER JOIN nested_table_1 AS nes_1 ON bt_1.nested_table_1_id = nes_1.id
INNER JOIN bridge_table_2 AS bt_2 ON bt_2.main_table_id = main.id
INNER JOIN nested_table_2 AS nes_2 ON nes_2.id = bt_2.nested_table_2_id
WHERE main.is_active = 'true';
 id | is_active |  name  | main_table_id | nested_table_1_id | id |  name   | main_table_id | nested_table_2_id | id |         name          
----+-----------+--------+---------------+-------------------+----+---------+---------------+-------------------+----+-----------------------
  1 | t         | main 1 |             1 |                 1 |  1 | Contact |             1 |                 1 |  1 | nested table second 1
(1 row)


See? The FROM clause sees only one row. All the further FILTER tricks are a no-op. This stems from SQL conceptual workflow which is pretty well described in SELECT statement Description. 

Looks like you need outer joins to catch the data you need. But then it will explode the rowcount of your result set.

So you need to rethink the whole query, especially this part which calculates contact_compliants. Maybe try to use EXISTS subqueries instead of JOINs?.

SELECT
  (SELECT count(*) FROM ...
   WHERE EXISTS (...)
   AND EXISTS (...)) AS contact_compliants, 
  ... /* more subqueries here */
FROM main_table AS main
WHERE main.is_active;


Side note: I'm not sure if your schema is optimal, maybe the design is too convoluted and you can simplify it?