Dimension of the vector space of homogeneous polynomials

Let $k[X_0, X_1, \ldots, X_n]_d$, or briefly $k[X]_d$, be the $k$-vector space whose elements are the zero polynomial and homogeneous polynomials of degree $d\geq 1$. I found the following formula for the dimension $$dim(k[X]_d)= \binom{n+d} {n}$$

but in my book there is no justification for this equality. Could someone explain me, possibly in an intuitive way, why that binomial coefficient is the dimension of that vector space?


Added later: Except the formula is correct, as shown in the comments below; I had mis-read it; when $d = 2$ and you have 3 variables, $n = 2$, since the variable indexing starts at zero. And 4-choose-2 is in fact six, as expected.

[what follows is incorrect]

A nice basis for that space consists of all monomials in the $n$ variables with total degree $d$.

Wait...what about degree $d = 2$ and $n = 3$ variables. Listing the basis elements, I see $$ x^2, y^2, z^2, xy, xz, yz, $$ which is only $6$ dimensions, but 5 choose 3 is 10. Seems as if there might be a mistake in your formula, or perhaps I'm not understanding how it's supposed to be applied. (See below for resolution of this apparent contradiction.)

I think (or thought) perhaps your formula is incorrect.