Ok, so let us think only of vectors with $\;n\;$ entries each of which is taken from the set $\;\{0,1,2,...,p-1\}\;$: clearly there are $\;p^n\;$ such vectors (for each entry there are $\;p\;$ choices...).
But you originally asked about $\;(\Bbb Z_p)_n[x]\;$ which, imo, is the set of all polynomials of degree up to $\;n\;$ (and sometimes: of degree less than $\;n\;$ ) with coefficients from $\;\{0,1,2,...,p-1\}\;$ , and again: in the first case there are $\;p^{n+1}\;$ , in the second $\;p^n\;$.
Why? Because each such polynomial can be seen as "a vector $\;(a_0, a_1,...,a_{n-1})\;$ with coefficients in $\;\{0,1,...,p-1\}\;$ (or up to $\;a_n\;$ , in the first case).