count Matching Values
inline fun <T> Field<*, T>.countMatchingValues(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<T>): Int
Counts the number of field values that satisfy the given predicate.
By default, the local value is excluded from the count. It is included only if reductionType is IncludingSelf.
Return
the number of values that satisfy the predicate.
Parameters
reduction Type
specifies whether to include the local value in the count (default is ExcludingSelf).
predicate
the condition to evaluate for each value.