added enumeration counting functionality