In python 3.8:
print(len([x for x in input("Enter your text: ") if x not in "., "]))
I hope this helps!
7.5m questions
10.1m answers