Why not some type of clip or magnet to tell the machine it's done? We have an automatic sharpener for band saw blades. It just has a magnet the it put on the blade to tell it to stop. Or even a sensor that could read a paint marker? I do plenty of chains, seems to me by the time I'd count cutters I'd be well on my way to having it already sharpened on a regular grinder. It's rare I end up with a bunch of chains that are the same. Often it's a pile of several brands and types a customer drops off.