This exact same thing happened to our team, except we lost SO many people. We started with 27 people I believe, and now we have 20, and that's with 3 or 4 new people that joined.
What y'all should be doing is having a lot of team bonding. Even if you set aside 15 minutes at the end of practice like, once a week, just to talk and get to know each other. We went out to dinner, had a secret santa exchange and it brought us so much closer just doing that. We've had so many people quit and we've changed our routine so many times before competitions. When you think about it though, if people are quitting, they aren't as serious about the sport, and then you lose a lot of negative people on your team. After these people quit, yeah, you're upset, but you also need to know that it's for the good of the team, and y'all will do so much better! So know that you have a better team, but to keep from losing more people, have team bonding and include everyone! It might not keep people from quitting, but it will greatly reduce it. :)