MySQL vs PostgreSQL: Benchmarking COUNT(*) execution speed
The way that both RDBMS do the count differs. In InnoDB we have the following behaviour by default:


  To process a SELECT COUNT(*) FROM t statement, InnoDB scans an index of
  the table, which takes some time if the index is not entirely in the 
  buffer pool. 


For Postgres, you may want to try to see if an index-only scan (which is closer to the InnoDB behaviour) can help you on this. More info here. Due the amount of rows and the bad cardinality of that value (almost 15% of the table according stats), I can't warranty that it will work, but you can try:

SELECT COUNT(t2_id) FROM t1 WHERE t2_id = 7;