  We develop the theory and properties of primitive unimodular $S$-arithmetic
lattices in $\mathbb{Q}_S^d$ by giving integral formulas in the spirit of
Siegel's primitive mean value formula and Rogers' and Schmidt's second moment
formulas. We then use mean value and second moment formulas in three
applications. First, we obtain quantitative estimates for counting primitive
$S$-arithmetic lattice points which are used to count primitive integer vectors
in $\mathbb{Z}^d$ with congruence conditions. These counting results use
asymptotic information for the totient summatory function with added congruence
conditions that are of independent interest. We next obtain two versions of a
quantitative Khintchine-Groshev theorem: counting $\psi$-approximable elements
over the primitive set $P(\mathbb{Z}_S^d)$ of $S$-integer vectors and over the
primitive set $P(\mathbb{Z}^d)$ of integer vectors with additional congruence
conditions. We conclude with an $S$-arithmetic version of logarithm laws for
unipotent flows in the spirit of Athreya-Margulis.
