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