Hi, what is the best way to count the total number of the same entity present in a map?

I would like to count the number of my spawn entities (for clarity, they are named "spawn_cube.mdl") in my map, store pointers to the entities, and use the pointers so that I can randomly select a spawn location for my player.