refractoring: adds student_count
Eliminates repetition