4. The right side of the inequality is zero when $|x| \leqslant 10$ (for other $x$ it is undefined). Denoting $\alpha=\frac{\pi x}{4}$, we get:

$$
\begin{aligned}
& \frac{\sin 2 \alpha-\cos 2 \alpha+1}{\sin 2 \alpha+\cos 2 \alpha-1} \geqslant 0 \Longleftrightarrow \frac{2 \sin \alpha \cos \alpha+2 \sin ^{2} \alpha}{2 \sin \alpha \cos \alpha-2 \sin ^{2} \alpha} \geqslant 0 \Longleftrightarrow \\
& \Longleftrightarrow\left\{\begin{array} { l } 
{ \frac { \cos \alpha + \sin \alpha } { \cos \alpha - \sin \alpha } \geqslant 0 , } \\
{ \sin \alpha \neq 0 }
\end{array} \Longleftrightarrow \left\{\begin{array}{l}
\frac{1+\operatorname{tg} \alpha}{1-\operatorname{tg} \alpha} \geqslant 0 \\
\operatorname{tg} \alpha \neq 0
\end{array}\right.\right.
\end{aligned}
$$

Therefore, $x \in[-1+4 k ; 4 k) \cup(4 k ; 4 k+1)$. On the interval $[-10,10]$, the integers are $-9,-5,-1,3,7$, of which the numbers $-9,-5,-1,3$ are within the specified interval, and their sum is -12.
Answer: -12.

Answer to the option: $4-2: 12$.