from collections import Counter
def readit(fname):
with open(fname) as f:
return f.read()
s = ''.join([readit(f'D:\\{i}.txt') for i in range(1, 11)])
for word, count in Counter(s.split()).most_common():
print(word, count)
If you want to know the usage of `Counter`, try `from collections import Counter;help(Counter)` at python idle.