As a student, I enjoy a low student to teacher ratio as opposed to a certain number of students. At my old dojo, we had classes of probably 20 - 25 and the dojo had a lot of space. We normally had our 2 head instructors there, plus 4 - 5 senior students (mostly shodan but also a few 1st kyu) who acted as assistant instructors. I got a lot of one on one time as a beginner, less so as I advanced, but we were generally always in very small groups.
My current dojo is small. A full class is usually 4 students and there's one instructor. It's also not unusual for me to be the only student on a Monday. I personally love those one on one classes. I get nitpicked, but I also get really good feedback. It is nice to have other students to work with, though, and 4 is nice because we can swap and work with people of different heights and skill levels. Odd numbers are fun sometimes because you can do some things like 2 against 1, which really changes the dynamics of sparring.
Occasionally we get visitors from other dojos in our organization, particularly around exam time. Once we ended up with a class of close to 10 and it felt super crowded. I wasn't a fan of that ratio at all.