Kind of a multi-question thread. How many characters are too many? If I'm just naming them, but not using them yet in the story, does that count toward the character count since they now have names? Or do they need a role? And when is the limit, for you personally, and technically? I've read GOT and George R.R. Martin names countless characters and doesn't use them. Is that okay?
It really depends. Is your story one of great kingdoms doing great deeds against great evils? Or is it about a couple of guys who are having a weekend adventure? If it's the kingdoms, you are going to have many important characters that are somehow important in-universe without being speakers. You can have characters who aren't talking characters who are still important, such as government officials, military officers and so forth. Say you have a Captain Vlad who isn't part of your main characters military unit and never is seen talking onscreen. Our character never interacts with him. Vlad's unit is important for defending Oh Ye Important River from the Kingdom of the Ones who are Our Enemies. Now, if it's Bro B and his main man Dude C on a weekend trip to Mexico, where they are going to get drunk and get laid, you don't need to know the name of the motel owner or even the majority of the seniorities who they are hitting on. Why? Because in such stories, the focus isn't this vast sweeping arena, but just two guys doing what two guys do. In this instance, maybe half a dozen at most? Maybe twelve but that's pushing it. The larger your story is, the more named non-speaking characters you can get away with. The smaller it is, the less you need and even want.
Only the important characters (besides MCs), should be named. Everyone else that isn't really part of the story/plot be they man/woman/chia-pet are just 'extras' that fill in the world to give it population, nothing more. Unless the MC(s) are trapped in a lone building/ship/space craft then it doesn't really matter about how many names you throw out, cause we know they are all alone in the dark corridors/decks/floors looking for a way out.
There is absolutely nothing wrong with writing up some "stock characters" that you give names and a brief background without a real plan. That way, when you get to a point in your story where you need a character, you just pull up your stock list and plug one in. It is totally alright.
I think it's fine to just mention a character but never show them. It when you have an active cast and characters that lend nothing to the story. They play not part in the plot, no part in character development of your other characters and feel like a dead weight. Sometimes you can blend two character together rather than have two separate characters. I'm in the feeling that less is more but some people do like an abundance of characters.
It depends on what kind of story you're writing. Personally I don't think there is such a thing as too many characters, just as many as one is willing to write. Also think about how many character interactions you want to write about - the more characters you add, the amount of character-other character interaction combinations greatly increase.
I'm not quite so binary on the whole concept of amount of characters, mostly since my own stories are kind of variable on how many characters will be named and/or be given any kind of larger meaning in regards to the story world as a whole. Creating more characters gives more room for the world to grow, while creating fewer can create anything from an atmosphere to an emotion. I, much like Bowie above, am one of the kinds of individuals that believes there really is no such thing as 'too many characters' or 'not enough characters.' Of course it depends on the kind of story you're writing, overall, but if you can give those characters meaning, they'll become more than just a name.
In my opinion, every named character should have a purpose and a personality. I am not a fan of absolute count, but I would caution you that using names without giving these characters purpose at the same time risks the reader forgetting the names immediately (because why should he remember them if the author doesn't give him a reason to?). And if the reader forgets the names, that kind of defeats the purpose of naming the characters. If a named character has a personality and a distinct role in the story, there's a good chance the reader won't mind a number of them. If the role is not defined, then either he'll forget the names or try to remember and get annoyed because why should he expand effort when he doesn't have a good reason to?
I had a lot of main characters (current WIP has about fifteen) that have background, conflicts, etc. But they interact with a lot of minor characters for various periods of time. My MCs are transiting over a wide area and they meet a lot of people with whom they interact briefly. Those minor characters need names, but they don't need backstory. Just names, and perhaps some description of what kind of a person they are now: asshole, nice guy, non-descript, based on their interaction with the MCs.
If you intend to use many characters, take a listen to 'the silmarillion' on youtube.It is free to listen. It is by Tolkien, wind it on about 40 minutes and just marvel at the sheer number of characters. Now it may be that the silmarillion and Tolkien is not your cup of tea, but this is incredibly popular. It inspired Goerge R.R Martins books. My point is it can be done and also work.