How do I fix my Minecraft sorting machine?
I have to admit that I'm having trouble understanding the question/problem that you are describing. I'm guessing that you simply want to sort 16 stack items from 64 stack items. Here is my solution.
The size of the stacks in the hoppers is important to maintain the correct comparator redstone levels. Since there are only three items in minecraft with stack size of 16 we can simply modify a standard item sorter to accommodate your needs. This is a proof tested solution to the problem. Do not adjust your volume, I didn't talk. I just recorded this real quick with no editing.
Edit: Afterward I realized that I forgot about empty buckets. Just add a forth column for empty buckets and set it up just like the others.