How to calculate an integral given a measure? If we are given a measure, for example the count measure over $\mathbb{N}$ so  the integral: $$ \int_{\mathbb{N}}fd\mu = \sum_{n=1}^{\infty}f(n)$$
to me it has sense, but my question is why? in general how to calculate the integral given a specific measure?
 A: Recall the definition of the Lebesgue integral of $f$ on a measure space $(X,\mathfrak{F},\mu)$: If $f$ is non-negative, then
$$\int\limits_X fd\mu=\sup\left\lbrace\int\limits_X sd\mu:\ 0\leq s\leq f,\ s\text{ simple}\right\rbrace.$$ We define it on absolutely integrable functions which can be both positive and negative by breaking them into positive and negative parts $f^+=\max \{f,0\}$ and $f^-=-\min\{f,0\}$ (respectively), then applying the above to each piece. Also, if $f\in L^1$, there exists a sequence of simple functions $(s_n)$ converging to $f$ pointwise so that $$\int\limits_X fd\mu=\lim_{n\rightarrow\infty}\int\limits_X s_n d\mu.$$ To find this approximating sequence, we find monotone non-decreasing approximating sequences for the positive and negative parts of $f$ (you can find this construction in any textbook). So, we really just need to remember how to integrate simple functions: 
If $s(x)=\sum\limits_{j=1}^n c_j\chi_{A_j}(x),$ where $A_j\in\mathfrak{F},$ then $$\int\limits_X sd\mu=\sum\limits_{j=1}^n c_j\mu(A_j).$$ Putting this all together allows us to calculate the integral of $f\in L^1(X)$.
