Better solution for difference of item numbers