I'm reading the book "Opera de Cribro" by J. Friedlander and H. Iwaniec, and Example 1.2 states
Edit: Here $$A(x)=\sum_{m~:~m^{2}+1\leq x}1~~,~~A_{d}(x)=\sum_{\substack{m~:~m^{2}+1\leq x}\\m^{2}+1\equiv 0\pmod{d}}1$$ $$A_{d}(x)=g(d)X+r_{d}(x)$$ and $g$ is a multiplicative function.
I understand that $|r_{p}(x)|\leq 2$ (in fact $|r_{p}(x)|<1$), but I don't get how is the CRT used to get $|r_{d}(x)|\leq 2^{\nu(d)}$. Any help would be appreciated.

Let $\omega(d)$ be the number of solutions to the equation $$ n^2+1\equiv0\pmod d. $$ Then we have $|r_d(x)|\le\omega(d)$. By CRT, we know that $\omega(d)$ is multiplicative, and by the theory of quadratic residue, we also know that $$ \omega(p)= \begin{cases} 2 & p\equiv1\pmod4\\ 0 & p\equiv3\pmod4 \end{cases} $$ This means when $d$ is a squarefree integer, we have $\omega(d)\le2^{\nu(d)}$. Hence, the result follows.