count('文字列'[, 開始位置[, 終了位置]]))
str = 'aaabbbcccddddeeefff' str.count('a') 3 str.count('a', 3) 0
組み込み型 — Python 3.7.3 ドキュメント