I have been working on a story for the past several months. Basically, it is about a group of orphaned girls whose parents were all part of a secret organization unbeknownst to them. I know, I know, sounds pretty boring and stuff, but I'm fixing it up, okay? I haven't actually started writing it, but one thing has been really nagging me. Do I have too many characters? There are 13 girls (well, one of them dies so...), a friend, their three caretakers, the evil lady, and the leader of the organization. They are the main/important characters (19 of them). Then there are the organization members and the evil people (idk how many of them yet). They are all like background people. Is it too much? This is all in like the first book. Yes, all the orphans play important roles, and yes, I've grown emotionally attached to all of them. I suppose I could introduce some orphans later on, but I really don't want to. Rick Riordan and J.K. Rowling got away with it alongside several other authors, but I don't know how memorable and distinct my characters are.
As with many things in writing there's no hard and fast rule on this - it is going to hinge on factors such as how big the book is, and even your intended audience.
Without reading your book it's hard to give a definitive answer as to whether you have too many - although my gut reaction is that 19 main characters is a lot. But the flipside is are they all really "main" characters?
You mentioned J.K. Rowling as an example as someone who had previous had a large number of characters - and you're correct in that the cast of characters for the Harry Potter series was extensive, but there were really only three "main" characters. As important as the roles were played by the other students, parents, teachers etc. were in the story. They were essentially supporting characters and if we look at what you've listed as "main":
their three caretakers
Sound like supporting characters to me.
the evil lady
Presumably the antagonist? Not a conventional main character IMO - as benficial to a story as well fleshed-out villain maybe they still are primarily there to drive the conflict and story for the main characters. Think of them as being a freebie in your main character count.
the leader of the organization
So what does this leave us with?
13 girls (well, one of them dies so...), a friend
Hmm.. it's still alot. You're asking the reader to not only keep track of all fourteen but also, presumably to care about all fourteen. That's a big ask - and if you're determined that these fourteen share equal billing as main characters you're going to have to give them all worthwhile character arcs, individually - because if more than one of them has essentially the same arc then they are essentially telling the same story. And that makes them kind of pointless.
I suppose I could introduce some orphans later on, but I really don't want to.
Could you introduce them all at the start and then shift focus between subsets of them as you tell further stories in the same world? There's nothing wrong with a character having a minor role in an initial book and being subsequently promoted to be a main character in a subsequent one.
all the orphans play important roles
While I don't doubt this, as mentioned earlier, playing an important role does not always mean that they are a main character. So think about what their roles are and how much of the story they actually need to be around for in order to fulfill that role.
Sticking with Harry Potter since I presume you're familiar with it Hagrid plays an important role in the first book, introducing Harry (and thus the audience) to the key concepts of the wizarding world and providing the main characters with information that is key to their success in the main events of the book. But he's not a main character, he's not along with them for their adventures. He pops up, moves the plot forward where required and then drops out again, and this is all perfectly normal.
I've grown emotionally attached to all of them.
I'm a big believer that having some level of emotional investment in your characters is a good thing - after all how can an author expect a reader to care about a character if they don't?
But you have to be careful not to let that investment become simple sentimentality, because then it risks getting in the way of the story being the best it can be. Don't be afraid to change characters, merge them or even cut them entirely. Sometimes you can have an absolutely awesome character but if they don't fit in the story they can make it worse, don't worry they aren't gone - one day you might find you've got the story that's perfect for them and you can pull them off the metaphorical bench.