int getWordCount(String? text) { if (text == null || text.isEmpty) return 0; return _kWordRegExp.allMatches(text).length; }