how to find the count of element in string in dart code example Example: dart count words in string return str.split(' ').length;