Returns the number of elements in this buffer.
Returns the number of elements matching the given predicate.