counting words and chars