Automatic sweet dispenser

Hi I am very new to Arduino and would like to create a sweet dispenser that i can dis pens 1 to 100 sweets.

You are going to have to tell us a lot more about these sweets. How are they packaged? How are they (to be) stored prior to dispensing?

I would like to be able to tell the machine to dispense any qty i tell it to

Hard-coded in the sketch? Via a keypad? Up and down buttons?