Implemented some item counting