<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):
 """ Return a new DStream in which each RDD has a single element generated by counting each RDD of this DStream. """

        return self.mapPartitions(lambda i: [sum(1 for _ in i)]).reduce(operator.add)