A check to see if objects are removed

Is there a way to have a function check to see if a set of objects are removed? lets say after the enemies are all dead(removed) so and so will happen. [import]uid: 54001 topic_id: 11945 reply_id: 311945[/import]

[lua]-- Create enemy Group
local enemiesGroup = display.newGroup();
– [Create enemy object and insert into enemiesGroup.]
– Check if enemy objects exist in enemiesGroup
if (enemiesGroup.numChildren) then
– Enemies still exist in enemiesGroup.
else
– No enemies exist in enemiesGroup.
end[/lua]

OR

[lua]-- Variables
local enemiesAlive = 0;
– [Create enemy object and add 1 to enemiesAlive]
– [When enemy object is destroyed subract 1 from enemiesAlive]
– If all enemies are destroyed
if (enemiesAlive == 0) then
– Do Something
end[/lua] [import]uid: 49978 topic_id: 11945 reply_id: 43554[/import]