The question is how?
Just let the teacher decide how many students they will take. If they think they can teach 50 students and the parents are willing to use their child's education dollars for that then great. I imagine it won't get that far in grade schools but when one teacher gets requests from all the parents and the others are scrambling to get enough students to fill their class, I'd say problem solved in terms of finding the best teacher.