how to count occurrences of lowercase in a string in dart code example Example: dart count words in string return str.split(' ').length;