That's not set in the code, but in the Test Properties. The option is called "Simultaneous Browser Connections". That determines how many instances of the script run simultaneously. Secondly you set either a test duration, or a number of iterations.
1. 100 users, test duration 1 hour.
Will run for one hour with 100 users, then quit hard at 1 hour. I mention a possible way of making that "softer" at the link below:
2. 100 users, iterations set for 300.
Will run the 100 users 3 times, to get a total number of runs of 300. It will quit when they all finish.
One thing to keep in mind is that all 500 users will do the EXACT same thing, at the EXACT same time with the normal script. This is not a good example of "typical production", and might not be the best way to test volume. In a prior post, I had mentioned one possible method for "staggering" your users so that you don't have this issue, but I don't recall which post I put it in. If you don't see it, I'll post it next week.
I prefer 'maliciously mischevious'.
TDAdmin of Evil