This is a little tricky since you want to perform an exact number of transactions. How many VU can you use to fill in the form? How long does it take to do the TMain (look at your baseline report). Using these figures you should be able to calculate how long you need to run the test for to create the required number of users. Use the steady state workload....
If possible, I would create the users in the DB directly, that way you can be sure you will get exactly 5000. Alternatively, you could run the test till you get over 5000 then delete a the excess users?
Actually there's a fairly simple way to do this. Use the queuing model workload, and set all the times to 00:00:00. Then decide how many vus you want to run and divide the total you want to end up with by that number:
5000 iterations divided by 100 users equals 50 iterations per user.
So if that works for you, set the User count in the workload to 100, then set the TMain count to 50 in the script dclUser section and run the workload. Each user will now stop after 50 iterations.
FYI, if you don't want to hit the environment with all 100 users all at once, put a wait statement at the end of TInit like:
gnUserID := GetUserId();