Mistake while computing residue of Dedekind Zeta function I want to calculate the following limit:
$$\lim_{s \to 1^+} (s-1)\zeta_K(s)  $$ where $K=\mathbb{Q}(i)$ with Dedekind Zeta function of it, $\zeta_K(s)$. We know that $\zeta_K(s)$ has a simple pole at $1$ and its residue can be found by class number formula given by $\cfrac{2^{r_1}(2\pi)^{r_2}Rh}{m\sqrt{(|\Delta)|}}$ where $r_1$ is the number of real embeddings of the field, $r_2$ for complex -nonconjugate- ones; $R$ for the regulator of $K, h$ is the class number of $K$, $m$ is the number of roots of unity in $K$ and $\Delta$ is the discriminant of $K$.
So, we have $r_1 =0, r_2 =1$. I found that $R$ is equal to $1$. $\mathbb{Z}[i]$ is PID so $h=1$. $\mathbb{Q}(i)$ has $\{1,-1,i,-i\}$ as roots of unity so $m=4$ and finally $\Delta  =-4$. Writing it all up, we get:
$$\cfrac{2^{0}.(2\pi)^{1}.1.1}{4\sqrt{(|-4)|}} = \cfrac{\pi}{4}$$.
On the other hand, I define another function $Z(s)=\displaystyle\sum_{x,y \in \mathbb{Z}^{>0}}\cfrac{1}{(x^2 + y^2)^s}$.
After few manipulation, I bounded $(s-1)Z(s)$ above and below with "usual" $\zeta$-function and concluded that $ \cfrac{1}{4} \le \lim_{s \to  1^+}(s-1)Z(s) \le 1$. With the help of a theorem, which I can state it in the comments if necessary,  $\lim_{s \to  1^+}(s-1)Z(s)$ is actually $\cfrac{\pi}{4}$.
Now, here comes the my question:
$\displaystyle\zeta_K(s) = \sum_{0 \ne I \subseteq \mathcal{O}_K} \cfrac{1}{N(I)^s}$ $K$ is PID so every ideal $I$ is of the form $(a+ bi)$ for some $a,b \in \mathbb{Z}$. Thus, we actually have
$$\displaystyle\zeta_K(s) = \sum_{0 \ne I \subseteq \mathcal{O}_K} \cfrac{1}{N(I)^s}= \sum_{a,b \in \mathbb{Z}-\{0\}} \cfrac{1}{N(a+bi)^s}=\sum_{a,b \in \mathbb{Z}-\{0\}} \cfrac{1}{(a^2 +b^2)^s}$$. 
It looks quite similar to our first function $Z(s)=\displaystyle\sum_{x,y \in \mathbb{Z}^{>0}}\cfrac{1}{(x^2 + y^2)^s}$ with some difference, we are now summing over all integers, not the ones in the first quadrant. Therefore, I am expecting that I should get $Res_{s=1}(\zeta_K(s)) = 4 \times Res_{s=1}(Z(s)) = 4 \times \cfrac{\pi}{4} = \pi$. However, in the beginning, we found that $Res_{s=1}(\zeta_K(s)) = \cfrac{\pi}{4}$.
So, what am I missing, what do I wrong? Thank you.

You write
$$\zeta_K(s)=\cdots=\sum_{a,b\in\Bbb Z-\{0\}}\frac1{(a^2+b^2)^s}.$$
But this isn't the case. Each nonzero ideal is $(a+bi)$ for four
different $(a,b)\in\Bbb Z^2-\{(0,0)\}$, since $\Bbb Z[i]$ has four units,
so
$$\zeta_K(s)=\frac14\sum_{a,b\in\Bbb Z-\{0\}}\frac1{(a^2+b^2)^s}.$$
