import os
file = open('wz.txt',mode='r')
dict = {}
for line in file:
h_line = line.split()
for key in h_line:
if (key[-1]>='a' and key[-1] <='z') or (key[-1]>='A' and key[-1] <= 'Z'):
key = key.lower()
else:
key = key.lower()[0:-1]
if key not in dict:
dict[key] = 1
else:
dict[key] += 1
count = 0
for key,value in dict.items():
count += value
print(count)
print(dict)