Enumerable.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.
This method is static.
Parameters
- source
-
Type: IEnumerable
A sequence that contains elements to be tested and counted.
- predicate
-
Type: Function - May be null
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.