Here's the go-to for counting stuff in pictures of lots of stuff: https://countthings.com/ This would probably be a hard case for it! But would be cool to see how well it works.
But I wonder about an app that can count things automatically, plus maybe also work out counts of 3D shapes by counting visible things and making estimates about packing ratios. A sort of "how many M&Ms are in the jar calculator" app. That'd be neat (and would ruin a fun game).