Problem with setting the condition

If you do not keep a track of them in an array already, then Get All Actors of Class and register them.

You can do it in the blueprint that will do the counting. And the count is the length of that array or they can be counted during that loop.