AI Letter Counting Explained: Why Chatbots Miss the R's in Strawberry
Chatbots can pass hard exams yet stumble on a piece of fruit. Here is what tokens and a 2024 study say about why.
In this story 9 sections
AI letter counting fails because chatbots read text as tokens, not letters. A token is a chunk of characters, such as "st," "raw" and "berry." A December 2024 study of eight models found the deeper problem is counting itself, especially when a letter repeats. Spelling the word out helps.
Ask a chatbot how many R's are in "strawberry" and you may get the wrong answer, delivered with total confidence. This explainer covers why AI letter counting goes sideways, what researchers measured, and how to get a trustworthy count. It is written for curious readers who use chatbots and want to know what is happening under the hood. Oddworldz covers the strange corners of the internet and AI, and this one has become a classic.
Why Can't a Chatbot Count the Letters in a Word?
A chatbot cannot reliably count letters because it never sees a word the way you do. It sees a short list of tokens, then predicts the next token. Counting a letter inside a token is a different skill from predicting fluent text, and nobody trained the model to do it directly.
That gap is the oddity. The same system can summarize a legal contract or write working code, yet it stumbles on a task a seven-year-old handles. Researchers point out that this is not a sign of laziness or a bug in one product. It shows up across models from different companies.
It also helps to remember what a large language model is. According to the Congressional Research Service (CRS), large language models are AI systems that model language using millions or billions of parameters. Those parameters are numbers, not a dictionary of spellings.
How Tokens Chop Words Into Pieces
Tokens are the chunks a model uses instead of letters or whole words. Georgetown University's Center for Security and Emerging Technology (CSET) explains that models cannot process words directly, so words are chunked into tokens and then turned into long lists of numbers. The CRS makes the same point in a short policy brief, noting that training data is broken into tokens, the basic units of text, and that training can involve trillions of them.
Here is what that looks like. One popular tokenizer splits "strawberry" into "st," "raw" and "berry." The model gets three chunks. To count the R's, it would need to know that "raw" holds one and "berry" holds two, then add them up.
Tokens are also uneven across languages. In the study discussed below, the English sentence "The sun is brilliant" takes four tokens in an older GPT tokenizer. The Spanish version, "El sol es brillante," has one fewer character but needs five tokens. Tokenization is a design trade-off between efficiency and fairness, and every vocabulary has fixed limits. Fixed limits shape what software can do, a theme we also saw in our explainer on how one oversized file broke sites.
What the Letter-Counting Study Actually Measured
The most thorough test we found is a December 2024 paper from researchers at Nanjing University of Aeronautics and Astronautics and the Universidad Politécnica de Madrid. The team posted it on arXiv, a public preprint server. They asked eight models to count every letter in 10,000 randomly chosen words, then checked the answers. The models came from Meta, Mistral, Google and OpenAI.
Oddworldz's editors read the paper's tables before writing this. Most models failed on more than half of the words, and even the best one missed 17%. Smaller open models in the 7 to 11 billion parameter range erred on 63% to 74% of words.
The study then compared errors against word features. The table below shows the Spearman correlation ranges the authors reported across the eight models. A number near zero means no link, and a number closer to one means a strong link.
| Word feature | Link to counting errors |
|---|---|
| Word frequency in text | -0.05 to 0.02 (none) |
| Number of tokens | 0.14 to 0.30 (weak) |
| Number of letters | 0.40 to 0.59 (moderate) |
| Repeated letters in the word | 0.45 to 0.72 (strongest) |
The pattern is clear. A rare word is not harder than a common one. A word with the same letter appearing two or three times is much harder.
Is Tokenization Really to Blame?
Tokenization is probably not the whole story. The study found that models almost never reported letters that were absent from a word, so they could spot the letters just fine. What they could not do reliably was tally repeated ones, which points at the counting step rather than the chunking step.
The authors tested this directly. They looked at letters that appear twice in a word, sometimes inside one token and sometimes split across two. Error rates were similar in both cases. If tokens were the main problem, the split case should have been worse.
There is a real counterpoint. The authors say further studies are needed, and other researchers have linked the problem to attention limits and to a lack of letter-level training data. The models tested were also 2024 versions. Newer ones may do better, so treat the exact percentages as a snapshot.
One more oddity: when a letter appears only once, the wrong answers tend to be too high. When it appears twice or three times, they tend to be too low. The models seem to lean on the most common answer in their training text, which is "zero or one."
Why Do Chatbots Pass Hard Exams but Fail Easy Counts?
Chatbots pass hard exams because those tasks reward pattern matching across huge amounts of text. Letter counting rewards exact, step-by-step bookkeeping. Models are strong at the first kind of task and shaky at the second, which is why simple arithmetic also trips many of them.
The study's authors reach for a literary comparison. They liken the models to Funes the Memorious, a character in a Jorge Luis Borges story who remembers every detail of every moment and struggles to think in generalities. A model that holds vast detail about language does not automatically hold a reliable procedure for tallying.
This matters for how you read chatbot claims. Benchmarks are written by people, and people tend to test the skills they expect to find. A high score on a reasoning benchmark does not promise accuracy on small mechanical tasks. The two skills are separate, and a model can have one without the other.
How to Get a Reliable Letter Count From a Chatbot
You can get a trustworthy count with a few small changes. Each step below makes the model handle letters rather than chunks, or removes the model from the counting job altogether.
- Ask the chatbot to write the word with a space between each letter.
- Ask it to list each letter on its own line, then count the lines for the letter you want.
- Tell it to reason step by step before giving a final number.
- Use a chatbot with a code tool, and ask it to run a short script.
- Check the answer yourself when it matters. A word fits in your head.
The study's authors note that having a model reason before answering is one proposed fix. Code is the sturdiest option. A script counts characters exactly because it works on letters, not tokens, so there is nothing to guess.
What Strawberry Reveals About Machine Confidence
The strawberry test is funny, but the lesson is serious. A chatbot can be fluent and wrong in the same sentence. It rarely says it is unsure about a count, because fluent text is exactly what it was built to produce.
That habit connects to other quirks. Our piece on why chatbots tell you what you want to hear covers a related failure, where the answer sounds helpful and bends toward the user. Another is the gap between machine and human perception, which we covered in our look at a York University study of brain-like vision models.
At Oddworldz, we think the right response is neither panic nor mockery. A tool that is brilliant at language and clumsy at counting is still a tool. You just need to know which jobs to hand it.
A Five-Minute Experiment You Can Run Yourself
You can test all of this without any special tools. Pick five words with repeated letters and ask your chatbot to count one letter in each. Write down its answers before you check them.
- "Strawberry" has three R's.
- "Bookkeeper" has two O's, two K's and three E's.
- "Mississippi" has four S's, four I's and two P's.
- "Banana" has three A's.
- "Committee" has two M's, two T's and two E's.
Next, ask again with the word spelled out one letter per line. Compare the two rounds. If the second round is more accurate, you have seen the token effect in your own chat window. If both rounds are fine, your model is newer or better tuned than the ones in the study, which is also a useful result.
The Practical Answer on AI Letter Counting
AI letter counting breaks down at the exact place where chunked text meets simple arithmetic. Repeated letters are the trap, and tokens are part of the picture without being the full explanation.
Next time you need a count, spell the word out or use code. Then compare the chatbot's answer with your own, and keep the habit of checking small facts that sound too easy to get wrong.
Why can't AI chatbots count the R's in strawberry?
Do newer AI models still get letter counting wrong?
How can I make a chatbot count letters correctly?
Is tokenization the only reason AI miscounts letters?
In this story 9 sections
Keep Reading
All storiesThe Odd List · Fridays