Refactoring the student count