Abstract
countThe predicate function to test each element.
An Opt containing the count of elements that satisfy the predicate, or None if the Opt is None.
opt([1, 2, 3]).countIn(x => x > 1) // Some(2)
opt([]).countIn(x => x > 1) // Some(0)
none.countIn(x => x > 1) // None
Counts the number of elements in the array inside the Opt that satisfy the predicate.