Refactored group count cache