As an alternative to Michael's answer (which does give the right hints), you can count the tuples $(a,b,c,d)$ for which $ad-bc=0$:
- If $a=0$ (one case) and $d$ arbitrary ($p$ cases) and $b=0$ (one case), then $c$ is arbitrary ($p$ cases), so this yields $p\cdot p=p^2$ tuples.
- If $a=0$ (one case) and $d$ arbitrary ($p$ cases) and $b\neq 0$ ($p-1$ cases), then $c$ must be $=0$, so this case yields $p\cdot(p-1)=p^2-p$ tuples.
- If $a\neq 0$ ($p-1$ cases) and $d=0$ (one case) and $b=0$ (one case), then $c$ is arbitrary ($p$ cases), so this yields $(p-1)\cdot p=p^2-p$ tuples.
- If $a\neq 0$ ($p-1$ cases) and $d=0$ (one case) and $b\neq 0$ ($p-1$ cases), then $c$ must be $=0$, so this yields $(p-1)\cdot(p-1)=p^2-2p+1$ tuples.
- If $a\neq 0$ ($p-1$ cases) and $d\neq0$ ($p-1$ cases), then $b$ can be arbitrary $\neq 0$ ($p-1$ cases), and $c$ is determined by $a$, $d$ and $b$, so this yields $(p-1)\cdot(p-1)\cdot(p-1)=p^3-3p^2+3p-1$ tuples.
In total, these five cases add up to
$$p^2+p^2-p+p^2-p+p^2-2p+1+p^3-3p^2+3p-1=p^3+p^2-p$$
"disallowed" tuples, so the number of elements of $G$ is
$$p^4-(p^3+p^2-p)=p^4-p^3-p^2+p=(p^2-1)\cdot(p^2-p)$$ (the last term being the standard way of expressing the group's order).