Given the equation $\begin{cases} x_1+x_2+x_3+x_4 =18\\ 0\leq x_i\leq 7 \text{ with } x_i \in \mathbb{N} \text{ and } 1\leq i\leq 4 \end{cases}$
how do I calculate the number of solutions with the inclusion-exclusion principle? (Given that $x_1=x_2=4, x_3=x_4=5$ and $x_1=x_2=5, x_3=x_4=4$ are two different solutions).
Furthermore, I'm also asked to calculate the number of solutions using a generating function.
How can I solve those two problems? Or could you give a hint?