A selection of $r$ objects is determined by the number of objects of each kind. So, the number of such selections is the number of triples $(i,j,k)$ such that $i+j+k=r$ and $i\le i\le m$, $1\le j\le n$ and $1\le k\le p$. When you look at the polynomial, this is exactly the coefficient of $x^r$. Indeed, to get $x^r$ one needs to choose some $x^i$ from the first factor, $x^j$ from the second factor and $x^k$ from the third factor so that $i+j+k=r$. The number of such choices equals the coefficient of $x^r$.