Class instances

Is there a way to dynamically find out how many instances of a class are on the stage?

i want to be able to create any number of instances of a class and be able to return a number value that shows how many instances have been created of that particular class.

Thank You In Advance