Counting guides

How to count pills and tablets from a photo

A phone photo can speed up a pill or tablet count, but only if the pills are laid out well. Here is how to set them up, take the picture, check the total and avoid the mistakes that make pill counter apps miss or double count.

White round tablets spread in a single layer on a dark blue counting tray, photographed from above.
Illustrative image created for this guide.

The short answer

Yes, you can count pills and tablets from a photo, and a pill counter app on a phone camera can do it in seconds. The catch is that the result is only as good as the layout. Pills that sit in one flat layer, apart from each other, on a background that contrasts with them, are easy to count for a person and for software. Pills that touch, stack, lie on their edge or are see-through are where counts go wrong.

So treat a photo count as a fast first number, then check it. For anything that matters, such as a prescription you need to reconcile, a stock check at work or a count you will write down and sign, recount by hand or have the person responsible verify it. Count Objects Camera and similar apps give estimates, not certified counts, and they are not medical devices.

When a photo pill count helps, and when it is not enough

Phone-camera pill counting has become a busy app category, with pharmacy-focused counters updating their listings this autumn and stressing that counts should be checked before they are relied on. That is a sensible rule for everyone. A photo count is most useful in situations like these:

  • Checking roughly how many tablets are left in a bottle before a refill or a trip, then confirming by hand.
  • Counting vitamins, supplements or other loose tablets you have bought in bulk.
  • Speeding up a stock or inventory check, where a second count catches errors.
  • Keeping a dated photo of what was in a container, so you can look back at it later.

How to set up pills for a photo count

Most of the work happens before you press the shutter. A few minutes of setup saves you from recounting the whole pile later.

  • Use a clean, flat, matte surface that contrasts with the pills: a dark tray or cloth for white tablets, a light one for dark or coloured capsules. Avoid patterned tablecloths and shiny trays that reflect light.
  • Spread the pills into a single layer. Nothing should sit on top of anything else.
  • Leave a small gap between pills. Touching tablets, especially flat ones side by side, can look like one larger object.
  • Lay every pill flat. Tablets standing on their edge look like short lines and are easy to miss.
  • Count different products separately. Mixed shapes and colours make both hand counts and app counts harder, and you should never mix medicines you need to keep apart.
  • Wash or dry your hands, and work somewhere pills cannot roll off and get lost. If you handle someone else's medicine, follow the hygiene rules of your workplace.

Taking the photo: angle, light and focus

Hold the phone directly above the tray, parallel to it, so every pill appears at roughly the same size. An angled photo makes the far pills smaller and pushes them together, which is where gaps disappear. Fill most of the frame with the tray, but keep a margin so no pill is cut off at the edge.

Use soft, even light: a bright room or daylight from a window works well. Strong overhead lamps create glare on coated tablets and dark shadows beside them, and both can be counted as extra pills or hide real ones. Turn the flash off if it causes a bright spot, tap the screen to focus on the pills and hold still. A sharp, evenly lit photo is the single biggest thing you can do for accuracy.

How to count pills from the photo, step by step

You can count from the photo yourself, use an app, or do both. Doing both is the quickest way to a number you can trust.

  • Take the photo as described above and check it on screen: zoom in on the edges and corners to make sure nothing is cut off, blurred or hidden in shadow.
  • If you use an app, run the count and look at the markers it places. Every pill should have exactly one marker; look for pills with none and for spots with two.
  • For a hand count, place a grid over the photo and count one cell at a time, using one rule for pills on a line, for example a pill belongs to the cell that holds most of it.
  • Compare the two numbers. If they match, you are done. If they differ, find the cells where they disagree and look at those pills closely.
  • For a count that matters, finish with a physical check: count the tablets back into the container in groups of five or ten.

A worked example: checking a bottle of round tablets

Say you want to know how many vitamin tablets are left in a bottle, with simple, illustrative numbers. You pour them onto a dark blue tray, spread them into one layer and nudge apart the few that touch. From directly above, the photo shows the whole tray with a margin on every side. An app count gives 87. A hand count over a four by four grid gives 89.

You look at the cells that disagree. In one, two tablets were still touching and got a single marker; in another, a tablet lay on its edge and was missed. Separating and flattening them and taking a new photo gives 89 in both counts. The two-minute check turned a close guess into a number you can write down, and you now know which setup habits to fix next time.

What trips up pill counter apps

A 2025 technical report in Cureus tested an AI pill-counting app used by pharmacists in Japan with three supplement samples: a capsule, a translucent (permeable) form and a tablet. The authors found that transparency, overlap and the direction the pills were placed in were important factors in whether the app recognised them correctly. Tablets placed close together in a vertical orientation and some overlapping combinations were not recognised correctly.

That matches what you see in everyday use with any camera counter. These are the situations to watch for:

  • Clear or translucent capsules, such as soft gels, which can blend into the background or show the tray through them.
  • Overlapping or stacked pills, where one hides part of another.
  • Pills lying on their edge, or close together in a line, which can merge into one shape.
  • Split tablets and broken pieces, which may be counted as whole pills, as separate pills or not at all.

Common mistakes when counting pills from a photo

Most wrong pill counts come from a short list of habits, and each has a simple fix.

  • Shooting the pile instead of spreading it. Always make a single layer first.
  • Taking the photo at an angle. Hold the phone parallel to the tray.
  • Using a white tray for white tablets. Pick a contrasting background.
  • Trusting the total without looking at the markers. Zoom in and check every edge and cluster.
  • Treating an app result as final for a prescription or a signed record. Recount by hand or have it verified by the person responsible.

Where Count Objects Camera fits in

Count Objects Camera detects items in a photo and shows a total, so you can take or choose a picture of tablets on a tray and get a quick count. Like every camera counter, it gives an estimate that depends on the layout, the light, the angle and the image quality. It is a general counting app, not a pharmacy system or a medical device, and it does not identify medicines.

Use it the way careful pharmacy apps describe their own tools: as an assistant that speeds up the first count, followed by a check. Our free Photo Count Readiness Checklist walks you through framing, focus, overlap, light and contrast before you take the picture, and the app is available on the App Store and Google Play.

Frequently asked questions

How accurate are pill counter apps? It depends mostly on the setup. In one layer, with gaps and good contrast, counts are often close; with touching, stacked, edge-on or clear pills, errors are much more likely. Always check the result before relying on it.

Can I count capsules and tablets in the same photo? You can, but it is better not to. Count each product separately, both for accuracy and so medicines that must stay apart are never mixed.

What background works best for counting pills? A flat, matte surface in a colour that contrasts strongly with the pills: dark for white tablets, light for dark or coloured ones.

Can a photo count replace a pharmacist's count? No. A photo count can speed up the work, but in a pharmacy the final count is the responsibility of the pharmacist or the process your workplace sets. At home, recount by hand when the number matters.

Does Count Objects Camera identify which pill is which? No. It counts items it detects in a photo. To identify a medicine, ask a pharmacist or check the label and packaging.

Sources and further reading