int wordCount(String text) { final words = text.split(RegExp(r'[ \n\t]+')); return words.where((word) => word.isNotEmpty).length; }