in reply to Counting chars in a HTML-page

You'd have to know how Office counts. Is & one character for offices? or 5? Does it count markup at all? How does it count multi byte charcters? Per byte, or per codepoint, or per grapheme?

"Character" is a very broad term which isn't defined precisely in this context.

And do you consider "your" result or the one from Office to be better? Why?

(and, does it matter? What do you want to do with that result?)