Hmmm...
I don't know about the sorter that was mentioned earlier, but it seems to me that it should be a simple matter to build your own sizer.
The key is to get all the cartridges to line up in one direction first. This can be done by taking a rectangular sheet of metal, maybe 12 inches long by 4 inches wide, and flexing it until you have a gentle curve. Any cartridge you place on this will naturally roll, aligning the cartridge cylinder axis in one direction only.
Build a wooden frame tray in which the sheet metal is mounted, which will keep the metal sheet in its flexed condition. The tray should have sides which are tall enough to keep the cartridges from sliding off when you tip the tray.
After building it, put a handful of cartridges in it and rock it gently back and forth. They should all roll freely and line up in one direction.
Then tip the tray slightly on its long axis to allow the cartridges to slide up against one of the long sides of the tray. All of the cartridges which end up sitting against the side of the tray will then be easy to compare to each other for relative lengths. Pick out the odd length cartridges and then remove all the rest in that row.
Repeat as necessary, adding more cartridges as required.
As an aid, you could also scribe a straight line that is 17 mm from the two long edges of the tray on the sheet metal.
As a slightly more complex alternative, build a cartridge sorter which works similar to a coin sorter.
Using sheet metal and wood, frame up something which first aligns all the cartridges in one direction. Then have it drop the cartridges down a slide big enough to allow them to roll on the slide with precision.
The slide should ultimately narrow down in widty to match the length of the 19 mm cartridge. As that point, the slide should be beveled at the edges to nudge the 17 mm cartridges to the center of the slide.
Now cut a hole centered in the slide which matches the length of the 17 mm cartridge. The shorter cartridges will drop through the hole while the longer ones pass over it.