I try to minimize characters in anything I write as a huge pet peeve of mine is having to work to figure out who everyone is. (This is doubly true if there isn't even a particular reason to have, say, two romantic musicians who work at day jobs they hate, both of whom wants to be in a relationship with the protagonist or whatever.)
Most of this I try to resolve super early on (e.g. in outline form), where I have an idea as to who the main characters are + the main plot and can add or subtract without it being a Big Deal. If there's a character (or more) who doesn't advance (or add to) the plot, I remove the character ASAP.
I also count the characters. I figure that it's reasonable to start page one (or whatnot) with 3 characters. More than that is confusing (because who knows who Abigail, Bob, Claire, Dog, and Emily are or what they're yammering on about?). For every 10 pages or so, I can probably add another, topping out at around 10-15 that the reader has to keep track of. (For which I include pretty much any named character who I expect the reader to remember without me having to remind the reader who they are any time they reappear. So like, Claire's Mom, who's always referred to as Claire's Mom when she appears even if she gets a name isn't included. But if I expect people to remember that Doug is the One Who Got Away who Claire still pines over, he's in the list.)
Note that there's no hard fast rule (this is just what I do). People *love* A Song of Ice and Fire which has like, a million characters. (estimate.) Some do not appear to have a unique role or purpose. (FWIW, I think this is more because of the great world building and plotting than because of the enormous number of characters, but clearly the million named characters don't stop the books from being loved.) People love Tolstoy, too, who not only has a million named characters, he also gives them the same freaking names. (Which is fun if you ever happen to read War and Peace, just saying...)
Also, the longer something is, the more leeway there tends to be as you can develop more characters in a million words than in 1000...
But my personal preferences tends to be to cut as much as you reasonably can. (As it makes it a lot easier on the reader, more likely the reader will *care* about the characters, and more likely that you, as a writer, can sufficiently develop them.)