Considering a cactus graph $G = (V, E)$, defined as:
A graph is a cactus if every edge is part of at most one cycle.
There is a way to calculate the number of cycles in this graph given only $n= |V|$ and $m = |E|$?
I did some examples before posting this, but now I think I got somewhere. If $G$ is connected, $m = n-1$ results that $G$ is a tree (we can not have less as $G$ will be disconnected). If $m > n-1$, then the number of cycles is equal to $m - n + 1$.
If $G$ is not connected, then we can take each connected component $C_{1}, ..., C_{k}$ and deal with them as a separated cactus graphs and then the number of cycles in the original graph is $\sum_{i=1}^{k} cycles(C_{i})$, where $cycles(H)$ is the function described above and $H$ a connected cactus graph.
Intuitively, I think that is because each edge added create exactly one cycle, as adding more than one cycle goes against the definition of the cactus. And to add a edge without adding a cycle you must connect a vertex that was previous isolated, not changing $m - n + 1$.
But I am not sure how to formalize this now.