You are asking for "combinations with repetitions" (you want to choose the 3 piles, 9 times, allowing the same pile to be chosen more than once, but you don't care the order in which you select the piles); it is sometimes also called (because of a particular method of proving the formulas) stars and bars:
Imagine all $9$ marbles on a line, indicated by stars: $\star\quad\star\quad\star\quad\star\quad \star\quad\star\quad\star\quad \star\quad\star$ Now, insert two vertical bar to indicate where you will finish the piles. For example, $\star\quad\star\quad\star\quad\star\quad\Bigm|\quad \star\quad\star\quad\Bigm|\quad\star\quad \star\quad\star$ means that you have 4 marbles in the first pile, two on the second pile, and three in the last pile; or $\Bigm|\quad\star\quad\star\quad\star\quad\star\quad\Bigm|\quad\star\quad\star\quad\star\quad \star\quad\star$ means no marbles in the first pile, four on the second pile, and five in the third pile; and $\star\quad\star\quad\star\quad\star\quad\Bigm|\quad\Bigm|\quad \star\quad\star\quad\star\quad \star\quad\star$ means four marbles in the first pile, no marbles on the second pile, and five on the third pile.
So you need to choose where to put two vertical bars. How many ways are there to do so?