It's ambiguous, but we can make a guess as to the meaning. It depends on how you interpret with.
I'm going to a party. (What kind of party?) A party with 500 guests.
In this interpretation, "with 500 guests" refers to how many people will be at the party. This number presumably includes the speaker.
Because the source is a probability textbook, I would say that this is the likely interpretation. Hypothetical scenarios in probability usually prefer round numbers.
I'm going, with 500 guests, to a party.
In this interpretation, you are going along with 500 other people, for a total 501 guests. This interpretation implies that you are the one bringing these guests. There may even be more people at the party, if there are others who brought guests as well.
If the number were smaller than 500 (say, 3 or 4), and if the quote were from a real person rather than a textbook, this is the interpretation I would tend to go with.