Here is a sketch of the proof. Also I will assume the followings:
We know well about what the sum $\sum_{n=1}^{\infty} f(n)$ means.
The integral $\int_{\Bbb{N}} s \, d\mu$ is well-defined for simple functions $s$ and is given by
$$ \int_{\Bbb{N}} \left( \sum_{j=1}^{m} a_j \mathbf{1}_{E_j} \right) \, d\mu = \sum_{j=1}^{m} a_j \mu(E_j) $$
for constants $a_1, \cdots, a_m$ and subsets $E_1, \cdots, E_m \subseteq \Bbb{N}$.
The key observation is that, for $E \subseteq \Bbb{N}$, the following holds:
$$ \mu(E) = \sum_{n=1}^{\infty} \mathbf{1}_E(n). $$
Proving this identity may depend on how exactly the counting measure $\mu$ is defined in your context. For any sensible definition, however, we may invoke mathematical induction to show that this is true for all $E \subset \{1, \cdots, n\}$ for all $n \in \Bbb{N}$. If $E$ is infinite, it will not be hard to show that both sides are $+\infty$.
From this, if $s = \sum_{j=1}^{m} a_j \mathbf{1}_{E_j}$ is a simple function such that $0 \leq s \leq f$, then
\begin{align*}
\int_{\Bbb{N}} s \, d\mu
= \sum_{j=1}^{m} a_j \mu(E_j)
&= \sum_{j=1}^{m} a_j \sum_{n=1}^{\infty} \mathbf{1}_{E_j}(n) \\
&= \sum_{n=1}^{\infty} \sum_{j=1}^{m} a_j \mathbf{1}_{E_j}(n)
= \sum_{n=1}^{\infty} s(n)
\leq \sum_{n=1}^{\infty} f(n).
\end{align*}
This shows that $\int_{\Bbb{N}} f \, d\mu \leq \sum_{n=1}^{\infty} f(n)$. For the converse direction, notice that
$$ \int_{\Bbb{N}} f \, d\mu \geq \int_{\Bbb{N}} \left( \sum_{j=1}^{m} f(j) \mathbf{1}_{\{j\}} \right) \, d\mu = \sum_{j=1}^{m} f(j). $$
Taking $m \to \infty$, we have $\int_{\Bbb{N}} f \, d\mu \geq \sum_{n=1}^{\infty} f(n)$ and hence the equality is established.