Calculating the number of students