SAP interview question

Write a code that counts the Number of objects created for a specific Class.