new function to calculate the total of students in all the cohorts