A good rule of thumb is a total equaling the age of the birthday child, up to 10. For me, I would NEVER invite more than 6 or 7 because really, are the others good friends? I would hate my child to be invited to every students' party...with a class of 25, you'd be invited to two or three parties a month? Why would anyone invite a child who you wouldn't invite over for a single playdate?
We sometimes had parties, sometimes we did not, its not something that was a given every birthday year. We mixed it up. Maybe one year the family went to WDW, one year we might have a camping sleepover with two guests, one year have the 5 or 6 good friends for a day of ice skating or a movie and pizza, but never 15-20 first-graders running around my house (or yard lol) and certainly never spending significant money to hold a party at a venue.