<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def counts(self, ids=None, setdata=False, output_format='DataFrame'):
 """ Return the counts in each of the specified measurements. Parameters ids : [hashable | iterable of hashables | None] Keys of measurements to get counts of. If None is given get counts of all measurements. setdata : bool Whether to set the data in the Measurement object. Used only if data is not already set. output_format : DataFrame | dict Specifies the output format for that data. Returns ------- [DataFrame | Dictionary] Dictionary keys correspond to measurement keys. """

        return self.apply(lambda x: x.counts, ids=ids, setdata=setdata, output_format=output_format)