@stable(as_of="0.4.0")
    def count(self, subsequence, start=None, end=None):
        if len(subsequence) == 0:
            raise ValueError("`count` is not defined for empty subsequences.")

        return self._string.count(
            self._munge_to_bytestring(subsequence, "count"), start, end)
Count occurrences of a subsequence in this sequence.
dataset/ETHPy150Open biocore/scikit-bio/skbio/sequence/_sequence.py/Sequence.count