code: def count(self, func):
          
          n = 0
          for element in self:
              if func(element):
                  n += 1
          return n
docs: Counts the number of elements in the sequence which satisfy the predicate func.
  
          >>> seq([-1, -2, 1, 2]).count(lambda x: x > 0)
          2
  
          :param func: predicate to count elements on
          :return: count of elements that satisfy predicate