I really don't know what exactly you want to achieve, therefore I'm shooting into the dark...
I wanted to have a sorting system where commonly used items (mainly ingots) are being sorted into chests for "manual" use, no big deal here. But I also wanted to have X amount of every sorted item...