how to count number of same letters in a word in dart code example Example: dart count words in string return str.split(' ').length;