Find Count() comparison that could be optimized

Proprietary

Detect Count(pred) == n and Count() > n comparisons which could use Where().Take(n+1).Count() or Skip(n).Any() for better performance.

OpenRewrite.Recipes.CSharp.CodeQuality.Linq.FindOptimizeCountUsage
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Linq.FindOptimizeCountUsage

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.