Read up on the "FindAllChildren" method that TestComplete attaches to objects. You can pass in as a parameter the class (wildcarded if you want) and it returns an array of all objects found that match your parameters. You can then use VarArrayHighBound to get the count.
Robert Martin [Hall of Fame] Please consider giving a Kudo if I write good stuff ----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group. I love good food, good books, good friends, and good fun.