Number of times other appears. "banana".countOf("a") → 3
other
"banana".countOf("a")
int countOf(String other) => other.isEmpty ? 0 : RegExp(RegExp.escape(other)).allMatches(this).length;