There are magic numbers in game design. You see them all the time. What's the best number of players in a tabletop? Five? Six? Seven? What's the best number of characters in a CRPG? Four? Five? Six? Eight? Fifteen? What's the best length for a game? Two hours? Ten? Twenty? Forty? Nine hundred?
Everybody seems to have an opinion on what the "magic number" is for any given situation. But most people's magic numbers vary from other people's magic numbers.
That isn't really very surprising, as most people's skills, preferences, and situation varies from other people's skills, preferences, and situation.
In truth, there's probably some insanely complex formula which pops out a magic number for any given situation. I don't know it, but fortunately, there's a shortcut. You see, the magic number is intended to make the game the most fun. Humans are generally pretty good indicators of how much fun a game is. Therefore, all you really need to do is get the number close to right and tweak the surrounding situation by watching which way your test subjects squirm.
The core of the idea of a magic number is weighing the speed and density of the complexity. The faster and denser a situation is, the lower the magic number is. Except when it comes to "length of game", since you're functionally dividing by "faster" and things get ooky. I really don't have any suggestions there, except that it's far more common to go too long than not long enough.
("Density of complexity" rather than simply "complexity": Go is a complex game, but the density of the complexity starts off quite low and then goes up... and then drops off again. It's really how much complexity the audience is exposed to at any given moment, rather than the total complexity of the game.)
Here's a couple of approximations you can do:
How big do you want your tabletop party to be? The answer is pretty easy: the faster and more densely complex you want the game to be, the fewer players you need. You can run a game with only two or three players, if you mire the game deeply in role-play and complicated situations.
On the other hand, a tactical gun-and-run using simple combat rules can support up to nine players! It's low-density, so the nine doesn't overcrowd.
Generally, I find I run best with five or six.
How big do you want your CRPG party to be? The thing to look at here is the speed and density of the combat system. The faster the combat, the fewer party members you need. The more statistical micromanagement, the fewer party members you need.
Some games run with only three party members and use an action combat system. Final Fantasy classically uses four party members with a fairly fast combat system and a lot of statistical micromanagement. A strategy RPG like Final Fantasy Tactics will typically have very slow combat system with some statistical management, and go in with eight or so characters. Very complex strategy games use minimal stats and go in with up to twenty characters.
There's really no limit on how far you can stretch it one way or the other: Elder Scrolls games typically go with just one character who has a hell of a lot of stat management. I've played a game where you have literally hundreds of units on the screen at once, but the interface is simplified so that you can control them in various easy ways, lowering the density of the complexity.
When designing your game, start with one aspect. How many characters do you want? Or how fast do you want combat to go? Or how dense is the complexity? From that, work out one more aspect, and the last aspect will be forced.
You can tweak it easily enough during prototyping.
There's lots of other magic numbers that don't look like magic numbers. For example: How many different kinds of equipment should I have? How many cutscenes? How many TACOs?
The rules are always the same basic rules: the faster and more densely complex the play, the smaller the magic number. You might not know what the multiplier is - is a three three? Or maybe it stands for "ten minutes"? But you can figure that stuff out pretty quickly.
The real difficulty comes when you use this basic idea for several aspects of one game, because then they all become interlinked. How many different types of equipment you have affects the density of the combat game. How many TACOs you have affects the speed of the exploration game.
That's when things get fun. :)