Exercise: count words from file


Given a text file like this one:


examples/count-words-from-file/words_and_spaces.txt
Lorem ipsum dolor qui ad labor ad labor sint dolor  tempor incididunt ut labor ad dolore lorem ad
Ut labor ad dolor lorem qui ad ut labor   ut ad commodo commodo
Lorem ad dolor in reprehenderit in lorem ut labor ad dolore eu in labor dolor
sint occaecat ad labor proident sint in in qui labor ad dolor ad in ad labor

words_and_spaces.txt
ad 13
labor 10
dolor 6
in 6
ut 5
lorem 5
qui 3
sint 3
dolore 2
commodo 2
eu 1
incididunt 1
tempor 1
reprehenderit 1
proident 1
ipsum 1
occaecat 1