What is the number of strictly positive integer solutions $(x_1,...,x_n)$ to the equation $x_1+...+x_n=k$?
Say $n=3$ and $k=5$, then we have $x_1+x_2+x_3=5$. It's easy to find that the number of solutions to this equation is $6$.
This is a standard placing $5$ people on $3$ chairs problem, with respect to order. So why isn't the answer simply ${5\choose 3}$, or in the general case of placing $k$ people on $n$ chairs ${k\choose n}$? Why do I have to subtract the $1$?
A particular solution of the equation $$x_1 + x_2 + \cdots + x_n = k $$ in the positive integers corresponds to the placement of $n - 1$ addition signs in the $k - 1$ spaces between successive ones in a row of $k$ ones. Thus, the equation has
$$\binom{k - 1}{n - 1}$$ solutions in the positive integers.
Consider your example. If we wish to find the number of solutions of the equation $$x_1 + x_2 + x_3 = 5$$ we must decide which two of the four spaces between successive ones in a row of five ones will be filled with addition signs. $$1 \square 1 \square 1 \square 1 \square 1$$ For instance, if we fill the second and fourth spaces with addition signs, we obtain $$1 1 + 1 1 + 1$$ which corresponds to the solution $x_1 = 2$, $x_2 = 2$, and $x_3 = 1$. Observe that there are $\binom{4}{2} = 6$ such choices, as you found.