Return the number of non-overlapping occurrences of subsection 'sub' in bytes B[start:end]. start Optional start position. Default: start of the bytes. end Optional stop position. Default: end of the bytes.
builtins/bytearray.count
bytearray.count