postgresql having count greater than