I lean towards a lot of characters in my books. I have 4 main characters and 27 total characters (the large character count is due to the type of story it is). Here are some things I learned about how to handle so many characters:
1. Have one primary main character. That is, the character the story revolves around. I made the mistake of giving equal weight to four main characters in a previous project, and it made it extremely difficult to do the query letter and synopsis without cluttering it with characters. When I added the bad guy into the mix, I ended up having five characters in the query--that's a lot for 250 words. And with the synopsis, critters had a hard time keeping track of who was who, but I couldn't omit any of the characters because I'd given them all equal weight.
2. Don't put too many characters in the first chapter. I had eleven named characters in the first chapter of that same project. One of the critters said she took out a piece of paper and wrote the names down to help her keep track. I've found that three characters is pretty good number, and then I filter in the others in the chapters that follow.
3. If an infrequent character appears, help the reader a bit with who he is. I have this problem with mysteries where it's revealed who the bad guy is, and I haven't a clue who he is.
So I'm eager to ask opinions as to whether four is too many?
I would say I know I have too many when I start getting confused about who is who. That's actually not true because my character count is higher now than when I was confusing them. But I was also having a lot of trouble with subplots, and then, some of the additions came from the subplots. I was getting confused because the characters didn't have any role in the story--just the subplot. So, for me, if the character feels like he shouldn't be in there, the scene shouldn't be in there.
Tip: With so many names, it's easy to get something wrong, especially if you change the character's name. I use a character information sheet. It's about four pages long. I list the characters in alphabetical order, then add in whatever details I used in the book like hair color or a bit of backstory. I also include the old name if I changed it. Most of these details are about four lines long.
Then, for the second part of the character information sheet, I make a list of the characters who came out. My project is intended as a series, so these are names that may reappear at a later date. It's also a quick reference in case I find that I left one of those names in.
The list is really handy because if I can't remember how to spell a name, I can just look it up.