Returns a new collection with the results of applying the specified function on each element of the source
collection, but only for those elements which return true upon evaluation of the predicate.
This method will count the number of occurrences of each value calculated by applying the
function to each element of the collection with the specified parameter as the second argument.