If all you care about is how many pieces of candy each chuld gets, then you are right. We would say in this case that the pieces of candy are "indistinguishable". But if you care WHICH piece of candy each child gets, e.g if the individual candies are numbered from 1 to 6, then there are many solutions corresponding to each solution of the equation $X_1+X_2+X_3=6$, In this case the problem is to count the number of surjective (or "onto") functions from a six-element set to a three-element set.
In general there is no "nice" formula (comparable to the one for the binomial coefficients) for the number of surjective functions from an $n$ element set to an $m$ element set, but this number is $m!S(n,m)$, where the expression $S(n,m)$ refers to a Stirling number of the second kind, and is defined recursively for $n,m>1 $ by $S(n,m)=mS(n-1,m)+S(n-1,m-1)$. The basis cases are a bit messy: $S(n,1)=1$, $S(n,n)=1$, and $S(n,m)=0$ if $n<m$ or $n=m=0$.
Actually $S(n,m)$ counts the number of partitions of $n$ distinguishable elements into $m$ non-empty sets. All onto functions from an $n$ element set to an $m$ element set are obtained choosing such a partition $p$ arbitrarily, and then assigning each of the $m$ elements of $p$ to one of the $m$ elements of the $m$-element set. There are $m!$ ways to do this, hence the formula $m!S(n,m)$.
A nice discussion of all this can be found in Section 1.4, "The Twelvefold Way", in Stanley's "Enumerative Combinatorics" volume 1.
Best Answer
Let $x_k$ be the number of pieces of candy of type $k$ the child takes. Then we wish to determine the number of solutions in the nonnegative integers of the equation $$x_1 + x_2 + x_3 + x_4 = 10 \tag{1}$$ subject to the restrictions that $x_k \leq 5$ for $1 \leq k \leq 4$.
The number of solutions to equation 1 is equal to the number of ways three addition signs can be placed in a row of $10$ ones, which is $$\binom{10 + 3}{3}$$ since we must choose which three of the thirteen symbols ($10$ ones and $3$ addition signs) are addition signs.
From these, we must eliminate those solutions in which the child takes more than five pieces of candy of one type. Since the child select $10$ pieces of candy, it is not possible for the child to take more than five pieces of more than one type of candy.
Suppose the child takes more than five pieces of candy of type 1. Let $y_1 = x_1 - 6$. Then $y_1$ is a nonnegative integer. Substituting $y_1 + 6$ for $x_1$ in equation 1 yields \begin{align*} y_1 + 6 + x_2 + x_3 + x_4 & = 10\\ y_1 + x_2 + x_3 + x_4 & = 4 \end{align*} which is an equation in the nonnegative integers with $$\binom{4 + 3}{3} = \binom{7}{3}$$ solutions. Since the child could have taken more than five pieces of candy from any of the four types, the number of ways the child can select ten pieces of candy without taking more than five of one type is $$\binom{13}{3} - \binom{4}{1}\binom{7}{3}$$