Postgres Use Variable In Soql Count