Postgres Count Over Partition By Sql