This is a question on notation
Can I express the total distance $s=s(t_1,t_2)$ that a moving body has traveled using the following (conditional) sum?
$$s(t_1,t_2) = \sum_{\forall [t_a,t_b] \subseteq [t_1, t_2]: x'(t) \neq 0} \big |x(t_a) - x(t_b) \big |$$
Note that the total space travelled is given by the summation of the absolute values of the displacements for every subspace of $[t_1,t_2]$ that the velocity has a constant sign.