counting and sorting the goods