What is the number of integer solutions of $2{x_{1}}+2{x_{2}}+{x_{3}}+{x_{4}}={12}$?

Here is another solution, using generating formulas:

Let the power of $x$ represent the value of $x_i$.

Then we have $$(1+x^2+x^4+\cdots)\times (1+x^2+x^4+\cdots)\times(1+x+x^2+\cdots)\times (1+x+x^2+\cdots)$$

$$=\left(\frac{1}{1-x^2}\right)^2\cdot\left(\frac{1}{1-x}\right)^2$$

$$=\frac{1}{(1-x^2)^2(1-x)^2}$$

$$=\frac{1}{1-2x-x^2+4x^3-x^4-2x^5+x^6}.$$

Now we want to find the coefficient of $x^{12}$. By (arduous or computer aided) long division, we get the same answer, $140$.

By the way, one easy way to do long division here is to type the expression into Wolfram Alpha with the phrase "taylor series for." Then it will give you the option to calculate more terms.


Sorry for making this an answer - it's a bit too long for a comment on Elliot's answer. As Elliot showed we only need to find the coefficient of $x^{12}$ for $(1-x^2)^{-2}(1-x)^{-2}$. This is quite simple without computer aid with a few tricks. First notice that $1/(1-x)^2 = 1+2x+3x^2+\cdots$. Since we are only interested in the coefficient in front of $x^{12}$ we can truncate the series at $x^{12}$. We have

$$(1-x^2)^{-2}(1-x)^{-2} = (1+2x^2+3x^4+\cdots)(1+2x+3x^2+\cdots)$$ Since the first factor has only terms of even powers we can ignore the odd powers in the second factor - so we only need to compute the coefficient of $x^{12}$ in $$(1+2x^2+3x^4+4x^6+5x^8+6x^{10}+7x^{12})(1+3x^2+5x^4+7x^6+9x^8+11x^{10}+13x^{12})$$ Now match terms so that the powers sum to 12 giving $$ 13*1+11*2+9*3+7*4+5*5+3*6+1*7=140 $$ The advantage of this manual method is that it easily generalizes to cases were 12 is replaced by another even number.