docs: def count(self, predicate=None):
          '''Return the number of elements (which match an optional predicate).
  
          Note: This method uses immediate execution.
  
          Args:
              predicate: An optional unary predicate function used to identify
                  elements which will be counted. The single positional argument
                  of the function is the element value. The function should
                  return True or False.
  
          Returns:
              The number of elements in the sequence if the predicate is None
              (the default), or if the predicate is supplied the number of
              elements for which the predicate evaluates to True.
  
          Raises:
              ValueError: If the Queryable is closed().
              TypeError: If predicate is neither None nor a callable.
          '''
  
          if self.closed():
              raise ValueError("Attempt to call element_at() on a "
                               "closed Queryable.")
  
          return self._count() if predicate is None else self._count_predicate(predicate)