How to count Active Sessions from Tomcat 7.
Add the following instrumentation under the Tomcat pbd.
-TraceOneMethodOfClass: org.apache.catalina.session.StandardSession expire
(Z) V SimpleDecrementor "Tomcat: Number of sessions"
TraceOneMethodOfClass: org.apache.catalina.session.StandardSession
SimpleIncrementor "Tomcat: Number of sessions"
Restart the application server.