It's not just how many classes there are, it's what those classes can do.

If Game A has like 30 classes, but most of the melee classes act the same way, with same mechanics and only with a few alterations here and there; then it's not gonna be interesting.

If Game B has only like 4 classes, but each class has 4-5 paths/branches/trees that play differently. And maybe with also ability to cross-class skills; then it's gonna be way lots more interesting.