Rough token count estimation (same heuristic as TS: length / 4).
int roughTokenCountEstimation(String text) { return (text.length / 4).ceil(); }