getDocumentCounters method
This method can be used to get the word and character count of the Document of the EditorState.
This does not modify the state of the counters of the service. If the service is running (isRunning) it will return the documentCounters. Otherwise it will compute it on demand.
Implementation
Counters getDocumentCounters() =>
isRunning ? documentCounters : _countersFromNode();