countBy

fun countBy(predicate: (T) -> Boolean): Int
fun countBy(predicate: Predicate<T>): Int

Parameters

predicate

the predicate to count by