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