Postgresql Function Select Count Sql Syntax W3schools