Spawning counter?!

I have set up a bubble spawning system however… I am trying to figure out a way to count the amount of bubbles spawned so I can stop spawning. For example lets say I don’t want to spawn more than 10 on the screen at once. Yet if say two of them pop, I need to spawn two more. Any thoughts, I have been playing with this for a while, but I can’t seem to find the right nodes to use. Thanks for the time and thoughts on this. I would personally love to just code this in as it’s own node, but I can’t get VS13 express to work, and that’s another problem in itself.

I’m doing something similar with bots.

I created an array that holds instances of every spawned bot, this allows you to check array length ect and remove/cap as needed.

you can use a compareInt node just after to spawn, use the input pin to add 1 to totalbubbles spawned and set “<” to fire again the spawn node.