  Let $G$ be a finite connected simple graph with $n$ vertices and $m$ edges.
We show that, when $G$ is not bipartite, the number of $4$-cycles contained in
$G$ is at most $\binom{m-n+1}{2}$. We further provide a short combinatorial
proof of the bound $\binom{m-n+2}{2}$ which holds for bipartite graphs.
