Spawn_count = Spawn_count + 1
if Spawn_count = 5
-- spawn object,
-- set Spawn_count = 0
If object.count not= int(number / 5) then spawn object
didn't really understand that but it gave me an idea which works.
my character on collision with an item, adds 1 to the variable
if the variable = 5, enemy spawn and set the variable back to 0
edit: ... i just realized that that's what you meant :S silly me
thanks for the help!