Given a set $S=\{x_0,\ldots,x_n\}\subset{\mathbb R}$ of $n+1$ knots denote by $V_S$ the vector space of linear splines $f\colon\>{\mathbb R}\to{\mathbb R}$ with knots in $S$. I claim that ${\rm dim}(V_S)=n+3$.
Proof. In order to fix an $f\in V_S$ we can freely choose $n+2$ slopes $m_i$ in the $n+2$ intervals
$$(-\infty,x_0), \ (x_0,x_1), \ \ldots, \ (x_{n-1},x_n), \ (x_n,\infty)\ ,$$
which then will determine $f'$ wherever defined. In this way $f$ is defined up to an additive constant, which is finally determined by fixing $f(0)$.$\qquad\square$
On the other hand, the $n+3$ functions
$$1,\quad x,\qquad\phi_j(x):=|x-x_j|\quad(0\leq i\leq n)\tag{1}$$
belong to $V_S$. I claim that they are linearly independent.
Proof. If
$$a+b x+\sum_{j=0}^n c_j \phi_j(x)\equiv0$$
then the $c_j$ have to vanish individually, because each $\phi_j$ has a property that cannot be annihilated by a linear combination of the other involved functions: It has a corner at $x_j$. From $ax+b\equiv0$ it then follows that $a=b=0$.$\qquad\square$
It follows that the functions $(1)$ form a basis of $V_S$. This implies that any $f\in V_S$ has a unique representation as a linear combination of the functions $(1)$.