  Every element $w$ in the commutator subgroup of the free group $\mathbb{F}_2$
of rank 2 determines a closed curve in the grid $\mathbb{Z} \times \mathbb{R}
\cup \mathbb{R} \times \mathbb{Z} \subseteq \mathbb{R}^2$. The winding numbers
of this curve around the centers of the squares in the grid are the
coefficients of a Laurent polynomial $P_w$ in two variables. This basic
definition is related to well-known ideas in combinatorial group theory. We use
this invariant to study equations over $\mathbb{F}_2$ and over the free
metabelian group of rank $2$. We give a number of applications of algebraic,
geometric and combinatorial flavor.
