たとえば、Pythonならstr.countを使えばオーバーラップ非許容版になるし、オーバーラップ許容版は先読みアサーションでできる。他の言語でも実装は同様に簡単だろうし、どうでもいい話だと思うよ。

print('111'.count('11')) #->1
print('3030303030'.count('303')) #->2

import re
print(len(matches := re.findall(r'(?=11)', '111'))) #->2
print(len(matches := re.findall(r'(?=303)', '3030303030'))) #->4