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

I think I kinda understand but I struggle with the coding a lot however, i think i can translate that into blueprints similarly, thank you very much