Fix bug for counting words in Go