[step:Count the points and lines in a projective plane of order $q$]Let $\Pi = (P,\mathcal L)$ be a finite [projective plane](/page/Projective%20Plane) of order $q$. Thus every line contains exactly $q+1$ points, any two distinct points lie on a unique line, any two distinct lines meet in a unique point, and there exist four points no three of which are collinear.
First fix a point $p \in P$ and a line $M \in \mathcal L$ with $p \notin M$. Such a line exists by the nondegeneracy axiom. Indeed, choose four points $a,b,c,d \in P$ no three of which are collinear. If $p$ is one of these four points, take $M$ to be the line through two of the other three points. If $p$ is not one of them, then at least one of the lines through two of $a,b,c,d$ does not contain $p$; otherwise the lines through $a,b$ and through $a,c$ would both contain the two distinct points $a$ and $p$, forcing them to be equal and making $a,b,c$ collinear.
Define $\mathcal L(p) := \{L \in \mathcal L : p \in L\}$, the set of lines through $p$. Define the map $\Phi_p : \mathcal L(p) \to M$ as follows: for each line $L \in \mathcal L(p)$, let $\Phi_p(L)$ be the unique point in $L \cap M$. This map is well-defined because every line through $p$ meets $M$ in a unique point. It is injective because if $L_1,L_2 \in \mathcal L(p)$ satisfy $L_1 \cap M = L_2 \cap M = \{m\}$, then both $L_1$ and $L_2$ contain the two distinct points $p$ and $m$, so uniqueness of the line through two points gives $L_1=L_2$. It is surjective because for each $m \in M$, the unique line through $p$ and $m$ lies in $\mathcal L(p)$ and meets $M$ at $m$. Hence $|\mathcal L(p)|=|M|=q+1$.
Now fix a line $B \in \mathcal L$ and a point $p \notin B$. The $q+1$ lines through $p$ meet $B$ in the $q+1$ distinct points of $B$. Every point $z \in P \setminus \{p\}$ lies on exactly one of these lines, namely the unique line through $p$ and $z$. Each such line contains $q$ points other than $p$, and these $q+1$ sets of points are pairwise disjoint away from $p$, since two distinct lines through $p$ meet only at $p$. Therefore
\begin{align*}
|P| = 1 + (q+1)q = q^2+q+1.
\end{align*}
Finally, since every point lies on exactly $q+1$ lines and every line contains exactly $q+1$ points, counting incident pairs $(p,L) \in P \times \mathcal L$ with $p \in L$ gives
\begin{align*}
|P|(q+1)=|\mathcal L|(q+1).
\end{align*}
Because $q+1>0$, we obtain
\begin{align*}
|\mathcal L|=|P|=q^2+q+1.
\end{align*}[/step]