# How do I quickly count pieces?

I have LEGO pieces divided into partitions in something like a tackle box, each of which indicates how many pieces are supposed to be in that partition. With few exceptions, each partition only holds one type of part, like this:

One slot might have, say, 5 axles, and another might have 82 friction pegs.

How can I quickly verify if there are the right number of pieces?

I've been thinking that if I went a partition at a time, I could take all the pieces out, spread them over a surface, shine them under a webcam, and have a computer or phone spit out a count for me. Perhaps there is a mechanical way to do this, or maybe using a (really accurate?) scale would do it.

Any recommendations?

Tackle boxes are very common for storing Lego, I use them myself. Unfortunately I've not found or seen a good way to count the pieces that are in them. The easy way is to take everything out of them, which I suspect is what you're trying to avoid.

One trick with that is to get a piece of cardboard (or plywood) twice the size of the tackle box, cut a hole in the centre, place it over the tackle box with the hole over a compartment, then invert it with your hand under the hole! With a little wiggling you'll end up with only the pieces from that compartment in your hand. Or, if you lose your grip, everything all over the floor. But when you have a lot of compartments or a lot of pieces, that method is much faster than picking pieces out of compartments by hand. Especially small tiles.

Using a counting scale is a very common way to count small items like this. Lego weigh parts, bags and sets repeatedly during manufacture as part of their quality control process - that's one big reason why so few sets have missing pieces.

The problem you have is that while it's easy to weigh the whole tackle box, that doesn't give you much information about what exactly is missing. I suspect that the uncertainty in the weight (from the variable weight of grime and water on the box) will be about the same as the weight of the smaller pieces.

Doing a search for "image analysis counting" I found this NIH paper that suggests that it's possible to do what you're looking for. I suspect the main problem will be getting images that show the entirity of each well in the tackle box, but you may find that just taking a photo from as far away as possible works. Then you have to set up and calibrate the software. I doubt it will work with irregular pieces or where you can't see every item, though. But it's worth trying just to reduce the overall effort.

Worth doing if you're going to be counting the contents a lot of times. Or you're interested in the problem.

• Thank you, Ӎσᶎ. I'm not at all opposed to taking the parts out of the tackle box -- it never even occurred to me that one might be able to count them otherwise. Its just that when I have more than a dozen pieces of one type, I want to be able to count them quickly after I've gotten them out of the box, just to check that the quantity is right. That paper you linked to looks very interesting. Nov 24, 2013 at 6:42

Weighing the whole box might help if you just want to check if it's complete - unless you fear extra parts.

If you want to weigh parts or group of parts, there are scales which have an "item" function - you weigh one, then set it as unit, and then you can use the scale to give a count of the parts on it rather than its total weigh. Precision is important, but usually it's good enough.

Also, if you want to count parts manually, an easy way is to spread them and set apart the ones you've counted, per group of 3 or 4 - and count the groups, not the parts. Taking the example of the friction pegs, you'd spread them, then push 4 aside and count 1, then 4 again and count 2, and so on. After you count 20, you should have 2 left. Note that usually the remainder is enough to get an idea of what's missing or not; so the count part is nearly optional - if there are two pegs left at the end, it could be that 4 are missing, but the likeliness of that is lower. Or, you could do it twice: once with groups of 4, the second time with groups of 5 - both times you need to end up with 2 left. Basically, you just use modulo arithmetic to check only the reminder; which is like the "proof by nine" - it doesn't prove your result is correct, but catches most errors.

• Thanks for the reply. I especially love the idea about grouping and counting the remainder. Nov 29, 2013 at 4:24