Hey!
Fortunately, what you're looking to do is pretty easy to set up by utilizing (you guessed it) variables.
As a basic introduction to what variables are, they're essentially just keep track of a number, in which you can use later.
To start things off, create a new event for your Garlic patch. Start off by using "Control Variable". At the top of the window by "Single", you'll have to pick a variable to use. Select an unused variable, and name it "Random Number".
Next, for "Operation" make sure "Set" is selected. Lastly, for Operand, select "Random. Here you list the minimum and maximum pieces of garlic you want to be able to collect. For this example, I'll use 1-3. Just click "OK", and you've successfully set up a variable!
Now to make use of it. Use the "Change Items" command, and select the garlic item. Instead of setting a static amount, you can now select your variable. You'll now be given a random amount of garlic depending on the min and max you set for the variable!