A word is a run of non-space characters. “well-known” is one word. A line break starts a new word. This will not match every publisher’s rule for hyphenation, and it does not count Markdown as rendered text.
If the limit is words, use the word count. If the limit is characters, check whether spaces count before you rely on either character number.