optimized count detail