Personally I think there isn't a right answer for this question, because how it plays out depends upon a multitude of game mechanics, & this is very situationally dependent.
For example, in my own current project each of my party members has nearly four hundred skills that they can learn potentially. However, they can only learn one per level, so even if they take the character to the level cap, they still can't learn all of them. Additionally how many skills they can have as active, i.e. take into battle with them, is capped out at twelve.
So each party member can only learn about 25% of the total available skills, & can only use about 3% of the total available skills at any given time.
Simply put, the idea is for the player to decide what rolls each character will fulfill via which skills they unlock, & then specializing further by choosing which specific skills from their respective pool they will take with them into battle. This allows them to customize their characters & their loadouts in preparation for various battles.
For example, one battle you have your healer load up on their status effect resistance booster spells to combat an enemy who uses a great number of status effect attacks. Another battle you're fighting frost based enemies, so you have your magic user load up on fire weapon & frost shield spells.
Because of the level of personal choice I grant the player in how they develop their character, the more skills I provide for them to choose from, the more they can make that character their own, & the more they can apply strategy to each potential battle.
On the other hand if I was going the opposite route of my current project, & instead each character would have their own unique class, skill set, play style etcetera, all predetermined. & by extension the player's choice revolved around building parties based on who was best suited to a given mission. I would dramatically reduce the number of skills they learned in total, & ensure that there was little to no overlap from character to character. With each character probably having no more than a dozen skills in total.
Simply put, the question is not "What is the ideal number of skills in a game?", but rather "What is the ideal number of skills in MY game?".