  Recently, Grynkiewicz et al. [{\it Israel J. Math.} {\bf 193} (2013),
359--398], using tools from additive combinatorics and group theory, proved
necessary and sufficient conditions under which the linear congruence
$a_1x_1+\cdots +a_kx_k\equiv b \pmod{n}$, where $a_1,\ldots,a_k,b,n$ ($n\geq
1$) are arbitrary integers, has a solution $\langle x_1,\ldots,x_k \rangle \in
\Z_{n}^k$ with all $x_i$ distinct. So, it would be an interesting problem to
give an explicit formula for the number of such solutions. Quite surprisingly,
this problem was first considered, in a special case, by Sch\"{o}nemann almost
two centuries ago(!) but his result seems to have been forgotten.
Sch\"{o}nemann [{\it J. Reine Angew. Math.} {\bf 1839} (1839), 231--243] proved
an explicit formula for the number of such solutions when $b=0$, $n=p$ a prime,
and $\sum_{i=1}^k a_i \equiv 0 \pmod{p}$ but $\sum_{i \in I} a_i \not\equiv 0
\pmod{p}$ for all $\emptyset \not= I\varsubsetneq \lbrace 1, \ldots, k\rbrace$.
In this paper, we generalize Sch\"{o}nemann's theorem using a result on the
number of solutions of linear congruences due to D. N. Lehmer and also a result
on graph enumeration. This seems to be a rather uncommon method in the area;
besides, our proof technique or its modifications may be useful for dealing
with other cases of this problem (or even the general case) or other relevant
problems.
