If I understand right, you need the number of ways to place every number of pebbles between 0 and 9 into every combination of compartments. Then you can reason as follows. The first compartment can be filled or not -- 2 possibilities. For each of those two, the second compartment cab be filled or not -- total four possibilities. For each of those four, the third can be filled or not -- this gives eight possibilities, etc. The total number is possibilities.