  Let $A_g$ be an abelian variety of dimension $g$ and $p$-rank $\lambda \leq
1$ over an algebraically closed field of characteristic $p>0$. We compute the
number of homomorphisms from $\pi_1^{\text{\'et}}(A_g,a)$ to $GL_n(\mathbb
F_q)$, where $q$ is any power of $p$. We show that for fixed $g$, $\lambda$,
and $n$, the number of such representations is polynomial in $q$, and give an
explicit formula for this polynomial. We show that the set of such
homomorphisms forms a constructible set, and use the geometry of this space to
deduce information about the coefficients and degree of the polynomial.
  In the last section we prove a divisibility theorem about the number of
homomorphisms from certain semidirect products of profinite groups into finite
groups. As a corollary, we deduce that when $\lambda=0$,
\[\frac{\#\operatorname{Hom}(\pi_1^{\text{\'et}}(A_g,a),GL_n(\mathbb
F_q))}{\#GL_n(\mathbb F_q)}\] is a Laurent polynomial in $q$.
