Proving that the boundary of all compact $1-$ manifolds have an even number of points. It is well-known that if $M$ is a connected $1-$ manifold, then it is diffeomorphic to either $[0,1]$, $[0,1)$, $(0,1)$, or $\mathcal{S}^{1}$.
It is often stated as a trivial corollary that if, in addition, $M$ is compact, then the boundary $\partial{M}$ has an even number of points. My question is how this follows from the above statement.
It is clear that if $M$ is compact, then that limits the choices which $M$ can be diffeomorphic to to either $[0,1]$ or $\mathcal{S}^{1}$. So let's suppose that it is the case where $M$ is diffeomorphic to $[0,1]$ through the map $\phi:[0,1] \rightarrow M$. 
Now, it's clear that $(\phi, [0,1])$ is not sufficient to be a chart for every point in $M$, because $[0,1]$ is not open in either $\mathbb{R}$ nor the halfspace $H^{1}$. Regardless, $M$ is a $1-$manifold by way of some charts by assumption, and hence we can talk about $int(M)$ and $\partial{M}$. We know from standard results that $int(M)$ is open in $M$ and $\partial{M}$ is closed in $M$, and that both sets are disjoint from each other, so we can say that
$$\phi: [0,1] \rightarrow int(M) \cup \partial{M}$$
is a diffeomorphism. But at this point I am a bit stuck. I feel like we should be able to prove that $\partial{M}=\phi(\{0,1\})$, and hence $\partial{M}$ consists of $2$ points, an even number, but I can't seem to make any headway here. 
Can anybody point me in the right direction? Thanks! 
 A: I think I'm probably repeating what is said in the comments. We know that a compact connected manifold (with boundary) of dimension $1$ is diffeomorphic to either $[0,1]$ or $S^1$. Note also that diffeomorphisms of manifolds with boundary preserve the boundary, i.e. if $f:M\to N$ is a diffeomorphism of manifolds with boundary $f(\partial M)=\partial N$. So, if $\#\partial M$ is finite, then so is $\#\partial N$ and $\#\partial M=\#\partial N$ when $M\cong N$.
It is not too hard to see that $\partial([0,1])=\{0\}\cup \{1\}$, and hence that $\#\partial [0,1]=2$. On the other hand, $\partial S^1=\varnothing$, so that $\#\partial S^1=0$. So, we have proven the result in dimension $1$. 
The classification of compact connected $1-$dimensional manifolds with boundary extends to the disconnected case, so that a compact $1-$dimensional manifold is diffeomorphic to 
$$ M(k,\ell)=\bigg(\coprod_{i=1}^k [0,1]\bigg)\sqcup\bigg(\coprod_{j=1}^\ell S^1\bigg)$$
for some $k,\ell\ge 0$.
Then, we see that $\#\partial M(k,\ell)=2k$. So, the result follows.
