How many integer solutions are there to the equation : $$ x_{1} + x_{2} + x_{3} + x_{4} + x_{5} + x_{6} = 29 $$
$$ x_{1}\geq1, x_{2}\geq2, x_{3}\geq3, 10 \geq x_{4}\geq0, x_{5} > 5, x_{6}\geq -2$$
Could anyone explain me how to approach that ? Specially when it comes to the restriction of  $x_{4}$.

Rewrite the equation using $y_1 = x_1 -1$, $y_2 = x_2 -2$, $y_3 = x_3-3$, $y_4 = x_4$, $y_5 = x_5 - 5$ and $y_6 = x_6 + 2$:
$$
    y_1 + y_2 + y_3 + y_4 + y_5 + y_6 = 29 - 11 + 2 = 20
$$
It is then best to use the generating function approach. We find 
$$
   g(t) = \sum_{y_1, y_2, y_3, y_5, y_6 \geqslant 0} \sum_{10 \geqslant y_4 \geqslant 0} y^{y_1 + y_2 + y_3 + y_4 + y_5 + y_6} = \frac{1}{(1-t)^5} \frac{1-t^{11}}{1-t}
$$
The answer is $[t^{20}]g(t) = [t^{20}]\frac{1}{(1-t)^6} - [t^{20-11}] \frac{1}{(1-t)^6} = \binom{20+6-1}{6-1} - \binom{9+6-1}{6-1} = 51128$:
In[132]:= SeriesCoefficient[1/(1 - t)^5 (1 - t^11)/(1 - t), {t, 0, 20}]

Out[132]= 51128

Confirmation by direct counting:
In[134]:= Sum[1, {y4, 0, 10}, {y1, 0, 20 - y4}, {y2, 0, 
  20 - y4 - y1}, {y3, 0, 20 - y4 - y1 - y2}, {y5, 0, 
  20 - y4 - y1 - y2 - y3}]

Out[134]= 51128

The generating function provides with an insight to tackle the problem directly by using $\{0 \leqslant y_4 \leqslant 10\} = \{ 0 \leqslant y_4\} \backslash \{11 \leqslant y_4\}$.
