Let $a$, $b$, $c$, and $d$ be real numbers with $|a-b|=2$, $|b-c|=3$, and $|c-d|=4$. What is the sum of all possible values of $|a-d|$?
We use the result that if $x$ and $y$ are real numbers, then the distance between them on the real number line is $|x - y|.$

First, we place $a$:

[asy]
unitsize(0.5 cm);

int i;

draw((-11,0)--(11,0));

for (i = -10; i <= 10; ++i) {
  draw((i,-0.2)--(i,0.2));
}

label("$a$", (0,-0.2), S);
[/asy]

We then place a label of $b$ on every point that is two units away from $a$:

[asy]
unitsize(0.5 cm);

int i;

draw((-11,0)--(11,0));

for (i = -10; i <= 10; ++i) {
  draw((i,-0.2)--(i,0.2));
}

label("$a$", (0,-0.2), S);
label("$b$", (-2,-0.2), S);
label("$b$", (2,-0.2), S);
[/asy]

We then place a label of $c$ on every point that is three units away from a point labelled $b$:

[asy]
unitsize(0.5 cm);

int i;

draw((-11,0)--(11,0));

for (i = -10; i <= 10; ++i) {
  draw((i,-0.2)--(i,0.2));
}

label("$a$", (0,-0.2), S);
label("$b$", (-2,-0.2), S);
label("$b$", (2,-0.2), S);
label("$c$", (-5,-0.2), S);
label("$c$", (-1,-0.2), S);
label("$c$", (1,-0.2), S);
label("$c$", (5,-0.2), S);
[/asy]

Finally, we place a label of $d$ on every point that is four units away from a point labelled $c$:

[asy]
unitsize(0.5 cm);

int i;

draw((-11,0)--(11,0));

for (i = -10; i <= 10; ++i) {
  draw((i,-0.2)--(i,0.2));
}

label("$a$", (0,-0.2), S);
label("$b$", (-2,-0.2), S);
label("$b$", (2,-0.2), S);
label("$c$", (-5,-0.2), S);
label("$c$", (-1,-0.2), S);
label("$c$", (1,-0.2), S);
label("$c$", (5,-0.2), S);
label("$d$", (-9,-0.2), S);
label("$d$", (-5,-0.8), S);
label("$d$", (-3,-0.2), S);
label("$d$", (-1,-0.8), S);
label("$d$", (1,-0.8), S);
label("$d$", (3,-0.2), S);
label("$d$", (5,-0.8), S);
label("$d$", (9,-0.2), S);
[/asy]

Thus, the possible values of $|a - d|$ are 1, 3, 5, 9, and their total is $\boxed{18}.$