Count characters in the text file