Implement counter caching optimizations