For some particular value of $N$, when $(a+b+c+d+1)^N$ is expanded and like terms are combined, the resulting expression contains exactly $1001$ terms that include all four variables $a, b,c,$ and $d$, each to some positive power. What is $N$?
The solution includes a use of stars and bars (which I generally understand), but how they manipulated the problem to make stars and bars applicable here confuses me.