Let $\Phi(N)$ denote the number of products of matrices $[ 1 & 1 // 0 & 1 ]$
and $[ 1 & 0 // 1 & 1 ]$ of trace equal to $N$, and $\Psi(N)=\sum_{n=1}^N
\Phi(n)$ be the number of such products of trace at most $N$.
We prove an asymptotic formula of type $\Psi(N)=c_1 N^2 \log N+c_2N^2
+O_\eps(N^{7/4+\eps})$ as $N\to \infty$. As a result, the Dirichlet series
$\sum_{n=1}^\infty \Phi(n) n^{-s}$ has a meromorphic extension in the
half-plane $\Re (s)>7/4$ with a single, order two pole at $s=2$. Our estimate
also improves on an asymptotic result of Faivre concerning the distribution of
reduced quadratic irrationals, providing an explicit upper bound for the error
term.