<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def count(self, func):
 """ Counts the number of elements in the sequence which satisfy the predicate func. 2 :param func: predicate to count elements on :return: count of elements that satisfy predicate """

        n = 0
        for element in self:
            if func(element):
                n += 1
        return n