<PackageReference Include="NUnit" Version="3.0.1" />

CollectionTally

public class CollectionTally
CollectionTally counts (tallies) the number of occurrences of each object in one or more enumerations.
public int Count { get; }

The number of objects remaining in the tally

Construct a CollectionTally object from a comparer and a collection

public bool TryRemove(object o)

Try to remove an object from the tally

public bool TryRemove(IEnumerable c)

Try to remove a set of objects from the tally