postgresql select count into variable