item_generator that reads in the number of different items and the number of items to be generated in total)