dart count string in strings code example Example: dart count words in string return str.split(' ').length;