Hi,
The InstanceCounts tracer group is created and turned on by the OOTB configuration. The only thing you have to do is tell APM which classes to track. There is an example in java2.pbd:
#IdentifyClassAs: com.acme.YourClassNameHere InstanceCounts
#IdentifyInheritedAs: com.acme.YourClassNameHere InstanceCounts
So all you have to do is add the following line to your custom pbd (and either reference it in the introscope.autoprobe.directivesFile property, in a pbl file or put it in the hotdeploy directory):
IdentifyMatchingClassesAs: "xx.yy.xx*" InstanceCounts
The rest of the configuration is already there and need no be duplicated!
Ciao,
Guenter