Counts words used and their frequencies within a .txt file