Let $X$ a topological space and $\mathcal B$ the Borel set of $X$. Let $\mu$ a measure on $\mathcal B$. Why if $\mu$ is $\sigma -$finite, then $\mu(K)<\infty $ for all compact $K\subset X$ ?
Attempts
Let $\{X_i\}$ a collection of $X$ s.t. $X=\bigcup_{i=1}^\infty X_i$ and $\mu(X_i)<\infty $ for all $i$. Let $\{U_i\}_{i=1}^n$ opens s.t. $$K\subset \bigcup_{i=1}^nU_i\subset \bigcup_{i=1}^\infty X_i.$$
I would agree if each $U_i$ is contained in a finite number of $X_j$, but I don't understand why it is really the case.
This is not true. Take $X=\mathbb Q$ (with the usual topology) and $\mu(A)=\#A$. Then $\mu$ is $\sigma$-finite, but$$\mu\left(\{0\}\cup\left\{\frac1n\,\middle|\,n\in\mathbb N\right\}\right)=\infty,$$in spite of the fact that $\{0\}\cup\left\{\frac1n\,\middle|\,n\in\mathbb N\right\}$ is compact.