Number of characters (excluding markup) in html.
html
static int characterCount(String? html) => toPlainText(html).replaceAll("\n", "").length;