I think on balance 150-300 per grade is ideal.
Schools that have less than 150 students in a grade just cannot offer students anything other than the same basic actives everyone has. You won't take calculus because there are not enough students to start a calculus class, and this holds back the smart kids futures. You will play football as we cannot field a team without every student there, it doesn't matter how much you would prefer to play any other sport instead we can (not they won't, they cannot) never start a team.
Schools with more than 300 start to get to the point where they can't let students into popular courses/sports and this breeds have/have-not culture wars.
My numbers above are close, but subject to some debate.
I should add that there were some specialized classes available, like programming, in the evening where people from multiple schools were gathered.