There is no real -right- number. Having multiple factions, even if they can't all be joined actually adds depth into the background story of the world.
If for instance, you just had Murkwood and Mesilena, and they were aligned against one another, you'd have a very monotone history. Black and White. Or Grey and Green as it were.
Then you have the playerbase size, which is often the source you take for how many factions you have. In its prime pre-wipe, KotL was seeing 50-60 highs, and 20 or so averages. Across seven factions(eight if you count Tolin, I don't), that led to a fairly decent grouping. Nowadays, we tend to average 4 with a normal high of about 12 and an extreme of 20. Not really "great" for sustaining diverse numbers.
But still, having different idealogies in the game in the form of factions, gives you a lot more breadth with the story. Klevnone as an angry collection of brutes who have been a failing nation for quite some time on the rebound. Mesilena cursed to decay in a swamp, rampant with rumours of undead and vampiric rulership. Murkwood with their forests. Armengar with their hate of mages(which appears to be breaking down). Calararian with their... magical cloudiness. Tozain... I'm honestly not really sure what Tozain's backdrop is/was... I always saw it as a desert trading city with sea ports to distant and undiscovered lands. And of course, Lapis, with their tread toward science and incorporating the mystical elements of the land into it, diverging from a purely mysticism backdrop that all the other people are in.
Obviously, Lapis is my favourite. >P
Part of the problem, however, is that Tolin has become the "go to" place for everyone, because they're an alt, or they don't like the ruler, or can't join Lapis... and it's deflating the ranks for the actual kingdoms, because... Tolin is kind of just there. I always thought Tolin to be a "punishment" for not being part of a city, as it were.
But, there is not "optimal number" per se, more factions is better for the story, bad for player density.