I already saw the calculations in the book of Diamond and Shurman pag 103 to count the number of cusps of $\Gamma_0(N)$ $(N>1)$ but I really can not understand how to do the calculations for $\Gamma_1(N)$ with $(N>1)$.
The calculation of the book is:
The To count the cusps of $\gamma_0(N)$ recall from Proposition 3.8.3 that for this group, vectors $\begin{bmatrix} a\\ c \end{bmatrix}$ and $\begin{bmatrix} a'\\ c' \end{bmatrix}$ with $\gcd(a,c)=\gcd(a′,c′)=1$ represent the same cusp when $\begin{bmatrix} ya'\\ c' \end{bmatrix}\equiv \begin{bmatrix} a+jc\\ c \end{bmatrix} \mod N$ for some $j$ and $y$ with $\gcd(y,N)=1$. The bottom condition, $c′\equiv yc \mod N$ for some such $y$, is equivalent to $\gcd(c′,N)=\gcd(c,N)$, in wich case letting $d=\gcd(c,N)$ and letting $y_0\in\mathbb{Z}$ satisfy $y_0\equiv c′c^{−1} \mod N$ makes the condition equivalent to $y\equiv y_0+iN/d \mod N$ for some $i$ (confirming the calculations in the paragraph is Exercise 3.8.4.). For any divisor $d$ of $N$, pick one value $c$ modulo $N$ such that $\gcd(c,n)=d$. Then any cusp of $\Gamma_0(N)$ represented by some vector $\begin{bmatrix} a\\ c \end{bmatrix}$ with $\gcd(c′,N)=d$ is also represented by $\begin{bmatrix} a\\ c \end{bmatrix}$ whenever $(y_0+iN/d)a′\equiv a+jc\mod N$ for some $i$ and $j$ , or $a\equiv y_0a′\mod \gcd(c,N,a′N/d)$, or $a\equiv y_0a′\mod \gcd(d,N/d)$. Also, $a$ is relatively prime to $d$ since $\gcd(a,d)∣\gcd(a,c)=1$, so $a$ is relatively prime to $\gcd(d,N/d)$. Thus for each divisor $d$ of $N$ there are $\phi(\gcd(d,N/d))$ cusps, and the number of cusps of $\Gamma_0(N)$ is therefore $\sum _{d∣N}\phi(\gcd(d,N/d))$.
There is an alternative calculation which is easier and very understandable for the cusps of $\Gamma_0(N)$ in How does this argument to count the cusps of $Γ_0 (N)$ work? but I do not understand how to used to get the number of the cusps of $\Gamma_1(N), N>1$.
Any help will be very very important, thank you in advance.