Let $G$ be a cyclic group with $N$ elements. Then it follows that
$$N=\sum_{d|N} \sum_{g\in G,\text{ord}(g)=d} 1.$$
I simply can not understand this equality. I know that for every divisor $d|N$ there is a unique subgroup in $G$ of order $d$ with $\phi(d)$ elements. But how come that when you add all these together you end up with the number of elements in the group $G$.
What you wrote is just the well-known formula
$$\sum_{d\mid n}\varphi(d)=n\ldots !$$
The basis of this, and in fact of your formula, is that there is one single, unique subgroup of order every divisor of $\;n\;$ : this is one characterization of finite cyclic groups.