Answer:
There are a total of 10 coins:
Because we have 10 small boxes, all equal, each box has the same probability of being picked.
the coins are:
4 quarters, 4 dimes and 2 nickels.
so 4 boxes have quarters, 4 boxes have dimes, and 2 boxes have nickels.
One way to simulate the experiment can be with a d10 dice, where if you roll it and the numbers are 0,1,2,3 this represents that you took a quarter, if the result is 4, 5, 6, 7 the result is a dime, and if the result is 8 or 9, the result is a nickel.
the problem if the coins are in your pocket is exactly the same because again you have the same distribution of coins and each coin has the same probability of being picked.