Solution
Given equation:
$$
x|x+3| + |x-1| - 2 = 0
$$
Critical points occur at:
$$
x+3=0 \Rightarrow x=-3, \quad x-1=0 \Rightarrow x=1
$$
So we divide the real line into three intervals:
Case 1: $x \ge 1$
$|x+3| = x+3,\quad |x-1| = x-1$
$$
x(x+3) + (x-1) - 2 = 0
$$
$$
x^2 + 4x - 3 = 0
$$
$$
x = \frac{-4 \pm \sqrt{28}}{2}
$$
Both roots are negative, hence no solution in this interval.
Case 2: $-3 \le x < 1$
$|x+3| = x+3,\quad |x-1| = 1-x$
$$
x(x+3) + (1-x) - 2 = 0
$$
$$
x^2 + 2x - 1 = 0
$$
$$
x = -1 \pm \sqrt{2}
$$
Both roots lie in $[-3,1)$, so both are valid.
Case 3: $x < -3$
$|x+3| = -(x+3),\quad |x-1| = 1-x$
$$
x(-x-3) + (1-x) - 2 = 0
$$
$$
-x^2 - 4x - 1 = 0
$$
$$
x = -2 \pm \sqrt{3}
$$
Only $x = -2 - \sqrt{3}$ satisfies $x < -3$.
Total real solutions:
$$
x = -2-\sqrt3,\; -1-\sqrt2,\; -1+\sqrt2
$$
Hence, the number of real solutions is
$$
\boxed{3}
$$