DM set and var count cached to reduce calls to JVM