Writing an integer $m$ as the sum of $2m$ integers contained in $[-2,2] \cap \mathbb Z$ Suppose that $m$ is a positive integer. I want all the possible ways to write
$$
m=k_1+\ldots+k_{2m}
$$
where $k_i \in [-2,2] \cap \mathbb Z$.
For example, if $m=1$, I can write
$$
1=1+0 \quad \text{or}\quad 1=2+(-1).
$$
Already at the step $m=2$, the number of ways increases quickly, so I am looking for a general way to solve this problem.
Edit. I am interested in the decomposition, not just counting. Moreover, the decomposition has to be invariant by the action of the symmetric group $S_{2m}$, that is the decomposition $m=k_1+\ldots+k_{2m}$ is the same of
$$
m=k_{\sigma(1)}+\ldots+k_{\sigma(2m)}
$$
for every permutation $\sigma \in S_{2m}$.
Edit 2. The problem is equivalent to find five non-negative integers $a,b,c,d,e \in \mathbb Z_{\ge 0}$ such that it holds
$$\tag{$\star$}
\begin{cases}
-2a-b+d+2e=m \\ a+b+c+d+e=2m
\end{cases}.
$$
At this point, I am also interested in the non-negative integer solutions of the system
$$\tag{$\star\star$}
\begin{cases}
-2a-b+d+2e=3m \\ a+b+c+d+e=2m
\end{cases}.
$$
 A: Letting $a$ be the number of copies of $-2$, letting $b$ be the number of copies of $-1$, and so on up to $e$ being the number of $(+2)$'s, then you want to produce all solutions to the following system of equations over the nonnegative integers:
$$
\begin{align}
a+b+c+d+e&=2m\\
-2a-b+d+2e&=t,\\
a,b,c,d,e&\in \mathbb N
\end{align}
$$
where $t$ is either $m$ or $3m$.
By adding three copies of the first equation to the second, we get an equivalent system of equations where all coefficients are positive.
$$
\begin{align}
a+b+c+d+e&=2m\\
a+2b+3c+4d+5e&=6m+t,\\
a,b,c,d,e&\in \mathbb N
\end{align}
$$
It is easy to do produce all solutions to such a system recursively. Namely, suppose we have already determined that $e_0$ is the value for $e$ in a particular solution. Then the remaining variables are solutions to the following simpler system:
$$
\begin{align}
a+b+c+d&=2m-e_0\\
a+2b+3c+4d&=6m+t-5e_0,\\
a,b,c,d&\in \mathbb N
\end{align}
$$
Therefore, we just need to loop through all possible values of $e$, then recursively return all solution for this simpler system for each. The lower limit for $e$ is $0$, and the highest possible value for $e$ is $\min(2m,\lfloor (6m+t)/5\rfloor)$, because the right-hand-side of both equations must be nonnegative.
Here is a Python implementation. Since this is a math site, I should really be language agnostic and just give you the algorithm in pseudocode, but Python is pretty close to pseudocode anyway. ¯\_(ツ)_/¯
Try it online!
def natural_solutions(coefs1, coefs2, targ1, targ2):

    if len(coefs1) == 0:         # If there are no variables,
        if targ1 == targ2 == 0:  # the constants on RHS must be zero.
            yield []
        return
    
    # Loop through every possible value of the last variable,
    # updating the constant coefficients (targ1 and targ2), and
    # yield all solutions with one fewer variable.
    max_value_for_last_var = min(targ1 // coefs1[-1], targ2 // coefs2[-1])
    for last_var_value in range(max_value_for_last_var + 1):
        new_targ1 = targ1 - last_var_value * coefs1[-1]
        new_targ2 = targ2 - last_var_value * coefs2[-1]
        for sol_vector in natural_solutions(coefs1[:-1], coefs2[:-1], new_targ1, new_targ2):
            sol_vector.append(last_var_value)
            yield sol_vector 

m = 5
t = m

for solution_vector in natural_solutions([1, 1, 1, 1, 1], [1, 2, 3, 4, 5], 2*m, 6*m + t): 
    print(solution_vector)

