There is no perfect amount, it all depends on what you need. The Michael Vey series started with 1 MC, then went up to 3, hired 2 more, rescued a couple more, ending up with about a dozen I think(and that's just the good guy side). The story was good, and not a whole lot got in the way of each other. On the other hand, the book Rash only really had one MC and it's just as good as the Michael Vey series.
Just make sure that you can keep track of everyone in your story, else you might accidentally just lose a character because you forgot about it and he disappeared in the middle of a paragraph. Just writing a note off to the side with everyone and some basic facts will really help you keep track of everyone.
Personally, I try to stay below three or four because that's about all I can keep track of, but I did do more once and had to write some of it down. So however many you can keep track of is a good number.