Counting words seems like counting spaces plus one. It isn’t, because text contains punctuation, symbols, line breaks, numbers and languages that don’t use spaces at all. Every word counter makes decisions, and different decisions produce different totals.

The basic method

Almost every counter works in two steps:

  1. Split the text into pieces at word boundaries: spaces, tabs and line breaks, sometimes also dashes or slashes.
  2. Filter the pieces, keeping only those that look like words.

Splitting on single spaces alone fails immediately: two spaces in a row create an empty “word”, and a line break without a space joins two words together.

Where counters disagree

TextCommon resultsWhy
don’t1Apostrophes inside words don’t split them anywhere.
well-known1 (sometimes 2)Most tools treat a hyphenated compound as one word.
yes—no1 or 2Depends on whether an unspaced em dash is treated as a separator.
A / B2 or 3Depends on whether a standalone slash counts.
3.14, 1,0001Numbers are generally one word.
example.com1Usually one; some tools split at periods.
– alone0 or 1Depends on whether punctuation-only pieces are filtered out.

In ordinary prose these cases are rare, so different counters usually agree closely.

Languages without spaces

Chinese and Japanese are written without spaces between words. Identifying words in them requires a dictionary-based segmenter, and even then native speakers disagree about boundaries. Word processors therefore usually count each character as a word in these scripts. Thai, Lao, Khmer and Burmese also lack spaces between words; simple counters, including ours, undercount them.

The rules TexaDocBase uses

  1. Split at any whitespace and at en and em dashes (– and —).
  2. A piece counts as a word only if it contains at least one letter or digit, in any script.
  3. Characters inside a piece, such as apostrophes, hyphens, periods and @, don’t split it: don’t, well-known, 3.14, e.g. and name@example.com are each one word.
  4. Each Han character, hiragana and katakana counts as one word.

When comparing or listing words (for unique-word and frequency counts), punctuation at the edges is removed (“(word),” becomes “word”), text is normalized to Unicode NFC, curly apostrophes become straight ones, and case is ignored unless you ask otherwise.

Which count is “right”?

None of them. If a limit is enforced by software, such as a university submission system or a publisher’s portal, that software’s count is the one that matters. Otherwise any consistent method is fine. The Word Counter lists its rules so you can see where it may differ.