← Blog

2026-08-07

Why AI Gets the Number of Objects Wrong

Why AI Gets the Number of Objects Wrong

AI image models don't really count: they mostly recognize "few" versus "many" rather than an exact number, which is why "three glasses" can easily become two or four. You steer the count better by asking for low numbers, naming each object explicitly, and fixing a wrong count in the editor instead of regenerating endlessly. Whenever an exact quantity matters, this is one of the most stubborn errors you'll run into. Below you'll read why it happens, at what number it breaks down, and how to steer it in your prompt.

Why does an AI model count wrong?

A text-to-image model doesn't count objects the way you do; during training it learns a rough sense of quantity and treats numbers more like categories ("a few", "many") than exact figures. As a result, the count in your image often lands close to what you asked for, but not quite right.

Research shows how structural this is. The study Text-to-Image Diffusion Models Cannot Count (2025) tested leading models on the T2ICountBench benchmark and found that no model reached above 50% average accuracy at generating the correct number of objects. More tellingly, the researchers conclude that prompt refinement, such as repeating the number again, barely improves counting accuracy. So this isn't a matter of "asking better", but a limitation in how the model works.

In short: the model knows you want several things, but it doesn't keep a precise tally while generating.

At what number does it break down?

Low counts usually work, and from around four objects of the same type it becomes unreliable. With one, two, or three objects the count is often right; as you ask for more, accuracy drops sharply and beyond roughly four it almost always goes wrong. Multiple studies on numerosity in image models converge on this same pattern.

In practice that means:

  • 1 to 3 identical objects: reasonably reliable, especially with a clear prompt.
  • 4 to 6: hit or miss; expect to check and adjust.
  • More than 6 identical objects: expect the count to be off often.

This applies most strongly to identical objects (six apples, four bottles). Objects that clearly differ from each other are a bit easier for the model to keep apart.

How to steer the exact number in your prompt

The best control is a combination of low counts, explicit naming, and clear placement. You don't force the model to count, but you make each object concrete enough that it's harder to ignore or duplicate.

  1. Keep the count low. Ask for three instead of eight. If you really need more, build the image in steps or add the rest later.
  2. Name each object separately. "A red, a yellow, and a green apple" works better than "three apples", because you give each item its own trait.
  3. Describe the placement. Put them "in a row", "two on the left and one on the right", or "in a triangle". An explicit layout helps the model keep the objects distinct.
  4. Avoid vague quantity words. Terms like "a few", "some", or "many" leave the count entirely to the model. Name a concrete number when the amount matters.
  5. Make identical objects slightly different. Small variation in color, angle, or size stops the model from merging or doubling items.

Then test small. Generate one image, count what's there, and adjust your prompt before making a whole series. If you want to build your prompt with subject, count, and scene neatly separated, the prompt generator helps you hold that structure.

What about large numbers?

If you need a crowd or a full table, describe the impression rather than an exact figure. A model renders "a busy market" or "a bowl full of grapes" more convincingly than "37 people" or "24 grapes", because it doesn't count precisely at large quantities anyway. For atmospheric shots where the exact number doesn't matter, this is the fastest route.

If the count does need to be right and involves many objects, work in stages:

  • Generate a base image with a few objects in the photo generator.
  • Then add the missing items or remove the extras with the editor.

That way you keep control over the final result without rerunning the whole image and hoping the count comes out right this time.

Fix a wrong count without redoing everything

If the count is just slightly off, you usually don't need to regenerate from scratch; a targeted fix is faster and cheaper.

  • Remove an extra with inpainting. In the photo editor, select the surplus object and let the AI fill the area with the background. Four glasses cleanly become three.
  • Fill in a shortfall. If an item is missing, select an empty area and describe the object that should go there, in the same style as the rest.
  • Regenerate with a different seed. Sometimes one new render with a small change in order or placement is enough to get the count right.

Because you pay per render and per edit, you only pay for the correction you actually need, instead of redoing the full image ten times.

Frequently asked questions

Why does AI generate the wrong number of objects?

Because an image model keeps no exact tally. It learns a rough sense of quantity and treats numbers as categories, so the count often lands close but not quite right. In the T2ICountBench test, no model reached above 50% average accuracy.

At how many objects does it break down?

One to three identical objects usually work. From around four, accuracy drops sharply, and beyond roughly six identical objects the count is often off.

Does repeating the number in my prompt help?

Barely. Research shows that prompt refinement doesn't meaningfully improve counting accuracy. What does help is asking for low counts, naming each object separately, and describing the placement.

How do I get exactly the right number on screen?

Generate a base image with a few objects, then correct the count with inpainting: remove an extra or fill in a shortfall. That way you keep control without re-rendering the whole image.

Counting stays a weak spot of AI image models, but with low counts, explicit objects, and a targeted fix you can still get the number under control. Create an account and try it on your next image.