Delete a number of added objects?

Hello.

How would I go about deleting a number of objects specified by the user? Like, if I add a bunch of rocks or something, and I want the user to be able to take a specified number of them each turn? Each of the objects would probably have the same property, and I think I can figure out how to add them, but from there I don’t know.

Thanks.