Tags of objects destroyed still exist

the script does this:

make 100 GameObjects tagged "foe"; 
destroy the first 10 GameObjects from the 100
find all the GameObjects marked "foe";, rename them all foe-1 to foe-90

the foes are named from number 10 to number 100, but foe numbers 0-9 are missing? i destroyed first 10 GameObjects before searching for them and labelling them!

why does it count through the tags of GameObjects that were destroyed? how long do the tags still exist for after they are destroyed, just a couple of frames?

Destroyed objects will be removed after the frame in which they are destroyed ends. Which means that you need to wait at least 1 frame before doing searches like that. On a side note, the destroyed object should return null if you check against it. So doing a simple if (object!=null) before setting the name should be enough to exclude them in the same frame.