Is it a custom class whoose instance that you want to keep track of? If so then you can keep a static variable inside that class and increment it each time when a new instance is created.
---- FeedFeeds : A new way to read news and blogs! http://www.feedfeeds.com
Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...