[Paper Review] Why Do Large Language Models (LLMs) Struggle to Count Letters?
This paper investigates why large language models (LLMs) fail at simple letter counting tasks, such as counting 'r's in 'strawberry'. Through empirical evaluation across eight LLMs on 10,000 words, it finds that errors are primarily due to difficulties in counting letters that appear more than once in a word, not tokenization or training frequency. The core limitation lies in the models' inability to aggregate multiple occurrences, despite correctly identifying individual letters.
Large Language Models (LLMs) have achieved unprecedented performance on many complex tasks, being able, for example, to answer questions on almost any topic. However, they struggle with other simple tasks, such as counting the occurrences of letters in a word, as illustrated by the inability of many LLMs to count the number of "r" letters in "strawberry". Several works have studied this problem and linked it to the tokenization used by LLMs, to the intrinsic limitations of the attention mechanism, or to the lack of character-level training data. In this paper, we conduct an experimental study to evaluate the relations between the LLM errors when counting letters with 1) the frequency of the word and its components in the training dataset and 2) the complexity of the counting operation. We present a comprehensive analysis of the errors of LLMs when counting letter occurrences by evaluating a representative group of models over a large number of words. The results show a number of consistent trends in the models evaluated: 1) models are capable of recognizing the letters but not counting them; 2) the frequency of the word and tokens in the word does not have a significant impact on the LLM errors; 3) there is a positive correlation of letter frequency with errors, more frequent letters tend to have more counting errors, 4) the errors show a strong correlation with the number of letters or tokens in a word and 5) the strongest correlation occurs with the number of letters with counts larger than one, with most models being unable to correctly count words in which letters appear more than twice.
Motivation & Objective
- To investigate the root causes of LLM failures in simple letter counting tasks, such as counting 'r's in 'strawberry'.
- To evaluate whether word or token frequency in training data influences counting errors in LLMs.
- To analyze the role of tokenization and attention mechanisms in letter counting performance.
- To determine whether the complexity of the counting operation—particularly letter multiplicity—drives errors.
- To identify whether LLMs fail to detect letters or to count them correctly, using error breakdowns by multiplicity.
Proposed method
- The study evaluates eight LLMs across 10,000 words, measuring their accuracy in counting occurrences of each letter.
- Letter counting errors are analyzed in relation to word frequency, token frequency, and letter multiplicity (number of times a letter appears in a word).
- The analysis includes breakdowns of errors into overestimation (higher than actual count) and underestimation (lower than actual count), especially for multiplicities of 1, 2, and 3.
- The impact of tokenization is assessed by comparing error rates when a letter appears twice in the same token versus in different tokens.
- The models' tendency to report non-zero counts for letters not present in a word is measured to assess detection capability.
- Statistical correlations are computed between error rates and factors like letter frequency, word length, and multiplicity of letters.

Experimental results
Research questions
- RQ1Does the frequency of a word or its subcomponents in the training data affect LLMs' letter counting accuracy?
- RQ2Is tokenization the primary cause of letter counting errors in LLMs?
- RQ3How does the multiplicity of a letter (i.e., how many times it appears in a word) correlate with counting errors?
- RQ4Do LLMs fail to detect letters or to count them correctly when they appear multiple times?
- RQ5Is there a systematic bias in LLMs' responses—such as over- or under-estimating counts—depending on letter multiplicity?
Key findings
- LLMs consistently fail to count letters that appear more than once in a word, with error rates increasing significantly as letter multiplicity rises.
- There is no significant correlation between word or token frequency in the training data and the frequency of counting errors.
- The strongest predictor of error is the number of times a letter appears in a word, especially when it appears more than twice.
- For letters appearing once, models most often overestimate the count (e.g., responding with 2 or more), while for multiplicities of 2 and 3, underestimation is the dominant error type.
- Models correctly identify the presence of letters in tokens, indicating that the core failure is in aggregation, not detection—especially for repeated letters.
- Larger models like GPT-4o and Llama 3 70B show significantly lower error rates than smaller models, suggesting scale helps but does not eliminate the fundamental counting limitation.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.