count

@ExperimentalCoroutinesApi suspend fun <T> Flow<T>.count(): Int (source)

Returns the number of elements in this flow.

@ExperimentalCoroutinesApi suspend fun <T> Flow<T>.count(
    predicate: suspend (T) -> Boolean
): Int
(source)

Returns the number of elements matching the given predicate.