For example :
tbl_ifo id | name | age | gender ---------------------------- 1 | John | 15 | Male 2 | Maria | 18 | Female 3 | Steph | 19 | Female
Simply use mysql_fetch_assoc and count the array using count() function