for these kind of loops I often use a while, I add a var like maxdeploy or deploycount.
spawned objects
while
(compare 2 vars) Object.Count <= maxdeplox
deploy/spawn
created objects (add another var, deploycount = 0)
while
deploycount <= maxdeploy
action: add 1 to deploycount, create object
this gives you a variable(s) to play with for how many you can deploy :)