I really like the core set of classes in 5e's PHB, or Pathfinder 2e's CRB. I think that's a good number and covers all the "iconic" classes that give D&D its identity.
Beyond that, I certainly don't mind new classes, but I want them to be rather distinct. I like how many of 5e's subclasses are full-classes from previous editons, or Pathfinder 2e's Archetypes which help you modify your existing class. If your new class feels too much like another class, maybe it should just be a subclass or archetype.