<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, axis='major'):
 """ Return number of observations over requested axis. Parameters axis : {'items', 'major', 'minor'} or {0, 1, 2} Returns ------- count : DataFrame """

        i = self._get_axis_number(axis)

        values = self.values
        mask = np.isfinite(values)
        result = mask.sum(axis=i, dtype='int64')

        return self._wrap_result(result, axis)