Fixes #3866: Text counter with footnotes.