結果 : sql function to count number of rows