Use .exists() instead of count() == 0

Postgres is fairly terrible at counting.