An Android app that counts objects in a photo, fully offline and open source.
| Take a Photo | Mark one Object | Get the Count | Verify Results |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
A stack of pipes, a crowd of people, a tray of pills: take a photo, draw a box around one of the things you want to count, and how many? finds and marks every object that looks like it. Everything runs on your phone. The app has no internet permission, so no photo ever leaves the device. Watch the full demo on YouTube.
Install · Usage · Accuracy · Building · Contributing · Acknowledgements · License
![]() |
![]() |
![]() |
| Coming soon | Coming soon |
- Take a photo or pick one from your gallery.
- Drag a box around one of the objects you want to count.
- Tap Count. how many? marks every object that looks like it.
- Check the result: drag the edges to count only part of the photo, tap a point to remove a wrong one, or tap an object to add one that was missed.
Counting takes a few seconds and works best when the objects are clearly visible and not too small in the photo.
On 100 test images from FSC-147, with one marked object as in the app, two out of three counts are within 10% of the true count. That's why the last step is checking the result: a few taps usually fix the count.
You need JDK 21 and the Android SDK. The build downloads the counting model from this repository's releases. With a phone attached via USB debugging:
cd android
./gradlew installReleasemodel/ exports the counting model (uv run modal run export.py, needs
uv and a Modal account) and holds the
benchmark: uv run benchmark.py. See AGENTS.md for all commands.
Contributions are welcome, from bug reports and feature requests to pull requests: open an issue.
how many? counts with GeCo2 as it is; we don't train our own model. So when the app miscounts a photo, that is usually the model's limit, and the way it gets better is a better model. When one comes out, we'll bring it into the app.
how many? stands on the shoulders of others' work:
- GeCo2 by Jer Pelhan, Alan Lukežič and Matej Kristan is the few-shot counting model that does the actual counting (MIT).
- SAM 2 by Meta, whose image encoder GeCo2 builds on (Apache 2.0).
- FSC-147 by Viresh Ranjan et al., the dataset GeCo2 learned to count on and our benchmark.
- ONNX Runtime by Microsoft runs the model on the phone (MIT).
- Space Grotesk by Florian Karsten is the typeface of the count (OFL).
MIT. The app's about page lists the licenses of everything it bundles.











































