How can I detect/count number of objects spawned in a room?

Thank you for the help and suggestion