$\color{red}{\mathbf{\text{general case}:}}$
if $X$ be arbitrary set and if $(X,P(X),\mu)$ be counting measure space on $P(X)$ such that
$\underset{\{x\}\xrightarrow{\hspace{1.2cm}}1}{\mu:P(x)\rightarrow [0,\infty]}$
and if
$f:X\rightarrow [0,\infty]$
be an arbitrary function on $X$,
then integral of $f$ is equal to
$\int_Xfd\mu\color{blue}=\underset{\underset{\text{$\phi$ is simple}}{\phi\leq f}}{\sup}\left(\int_{X}\phi\; d\mu\right)=\underset{\underset{\underset{\text{F is finite}}{F\subseteq X}}{\phi\leq f}}{\sup}\left(\underset{x\in F}{\sum} \phi(x)\right) =\underset{\underset{\text{F is finite}}{F\subseteq X}}{\sup}\left(\underset{x\in F}{\sum} f(x)\right)
\color{red}=\underset{x\in X}{\sum}f(x)$
in fact equality in blue, is definition of integral and equality in red is definition of sum of arbitrary positive function on arbitrary set $X$.
now, let $f:X\rightarrow \mathbb{C}$. if
$$\int_X |f|d\mu<\infty$$
then integral of $f$ is defined by:
\begin{align*}
&\int_X fd\mu\\
&=\Bigg[\int_X f^+_{Re}d\mu-\int_X f^-_{Re}d\mu\Bigg]+i\Bigg[\int_X f^+_{Im}d\mu-\int_X f^-_{Im}d\mu \Bigg]\\
&=\Bigg[\underset{x\in X}{\sum}f^+_{Re}(x)+ \underset{x\in X}{\sum}f^-_{Re}(x)\Bigg]+i\Bigg[ \underset{x\in X}{\sum}f^+_{Im}(x) - \underset{x\in X}{\sum}f^-_{Im}(x) \Bigg]
\end{align*}
$\color{red}{\textbf{the case $X=\mathbb{N}$}}$
now, if $X=\mathbb{N}$, then for function $f\geq 0$, we have
$\int_{\mathbb{N}}fd\mu=\underset{n\in \mathbb{N}}{\sum}f(n)$
and integral for complex function, is defined as above.