Pythonを使ってリスト内の文字列要素の重複を調べ、その結果を重複数の降順で要素、重複数として出力するためのスクリプトです。
内包表記で表現しています。
data = ['a', 'b', 'c', 'd', 'b', 'c', 'd', 'b', 'c', 'b']
result = sorted({i: data.count(i) for i in set(data)}.items(), key=lambda x: x[1], reverse=True)
print(result)
>>> [('b', 4), ('c', 3), ('d', 2), ('a', 1)]