Postgres Select Count From Sql Command List