  Let $F$ be the function field of a projective smooth geometrically connected
curve $X$ defined over a finite field $\mathbb{F}_q$. Let $G$ be a split
semisimple algebraic group over $\mathbb{F}_q$. Let $S$ be a non-empty finite
set of points of $X$. We are interested in the number of $G$ cuspidal
automorphic representations whose local behaviors in $S$ are prescribed. In
this article, we consider those cuspidal automorphic representations whose
local component at each $v\in S$ contains a fixed irreducible Deligne-Lusztig
induced representation of a hyperspecial group. We express that the count in
terms of groupoid cardinality of $\mathbb{F}_q$-points of Hitchin moduli stacks
of groups associated with $G$. In the course of the proof, we study the
geometry of Hitchin moduli stacks and prove some vanishing results on the
geometric side of a variant of the Arthur-Selberg trace formula for test
functions with small support.
