Grouping.count Method

Returns the number of elements in a sequence. If "predicate" is provided, returns a number that represents how many elements in the specified sequence satisfy a condition.
 

Parameters

predicate

Type: Function
A function to test each element for a condition.
Optional: True

Return Value


Type: Number
A number that represents how many elements in the sequence satisfy the condition in the predicate function.