problem 2, parse text to json and counting words