proof regarding zeta function of a curve from Ireland and Rosen's "A Classical Introduction to Modern Number Theory" In chapter $11$ section $5$ titled "the last entry" the authors state that the number of solutions to the congruence $x^2+y^2+x^2y^2 \equiv  1 \mod p$ is $p+1-2a$, where $p=a^2+b^2$ and $a+bi \equiv  1 \mod 2+2i.$
To prove this, they state another theorem:

Consider the curve $C$ given by $x^2t^2+y^2t^2+x^2y^2-t^4$ over $F_p$ where 
  $p \equiv  1 \mod 4$. Write $p=a^2+b^2$ with $a$ odd and $b$ even. if $4\mid b$, choose
   $a\equiv 1\mod 4$; if $4\not\mid b$, choose $a\equiv -1\mod 4$. Then the number of points on $C$ in $P^2$ ($Fp$) is $p-1-2a.$

How does this second theorem relate to the first statement? It seems it's to prove the first one but I don't see how exactly. For instance, I don't see how the variable $t$ comes into play.

A point $[x,y,t]$ on $C$ in $\mathbb{P}^2$ with $t \neq 0$ corresponds bijectively to a solution $(x/t, y/t)$ to the given (dehomogenized) equation. There are 2 points on $C$ in $\mathbb{P}^2$ when $t = 0$. This explains the difference of 2 in the point count of OP's question and the quoted theorem. 
It does seem that OP may have a typo, where OP's question should have $p -1 - 2a$ points, and the quoted theorem should have $p+1-2a$ points.
