If you have a fixed number of enemies that you added manually, then the skeleton-spawner code wouldn't apply to your case exactly. Instead of spawning enemies when loading a saved game, you would only restore the variables.
Instead of keeping track of the number of enemies, you could place the enemies in a group, e.g. "enemies". Then it's easy to iterate through that group.
You might want to change your code to spawn the enemies, instead of adding them manually. That would be more flexible.