code: def count(self, i):
          
          if self._stop > self._start and self._step > 0:
              return int(self._start <= i < self._stop and
                         (i - self._start) % self._step == 0)
          elif self._stop < self._start and self._step < 0:
              return int(self._start >= i > self._stop and
                         (i - self._start) % self._step == 0)
          else:
              return False
docs: rangeobject.count(value) -> integer -- return number of occurrences
          of value