Random item quantity

I don't have much experience with RPG Maker, and hope that someone can tell me how to:

Make a event that gives the player a random number of items when used (Action Button).

In my game, i want the player to get 1-3 wood logs when hitting "enter" at a wood pile.
could use a script call... Something like...

Code:
$game_party.gain_item( $data_items[ INSERT ITEM ID HERE ], rand(3) + 1 )
You can also do it without script calls.

When you're giving the player the items, see how you have the option to give them a variable's number of items?

Just make a variable equal a random number between 1 and 3 (by using "Control Variables"), then give the player the item and select that variable as the amount.
Sorry for my late answer, but i have been busy studying because i'm graduating. I got it to work as @Petite Elite suggested. Thanks for both answers.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/random-item-quantity.27161/