There is a stackable library you could use for the stones --
viewtopic.php?f=18&t=3515 Though you'll need a script to create more stones when you mine.
I don't have time at the moment to give an example but if someone doesn't come along to help I can give this a shot later.
However as a first step I recommend you try to code a script that, whenever you mine, creates a stone and puts it in your inventory. Don't worry about how it looks or anything, just try to get the stones created.
To do this you'll want this function:
http://quest5.net/wiki/CloneAnd maybe this for convenience:
http://quest5.net/wiki/CloneObjectAndMoveGood luck!