  For a fixed finite solvable group $G$ and number field $K$, we prove an upper
bound for the number of $G$-extensions $L/K$ with restricted local behavior (at
infinitely many places) and ${\rm inv}(L/K)<X$ for a general invariant $"{\rm
inv}"$. When the invariant is given by the discriminant for a transitive
embedding of a nilpotent group $G\subset S_n$, this realizes the upper bound
given in the weak form of Malle's conjecture. For other solvable groups, the
upper bound depends on the size of torsion of the class group of number fields
with fixed degree. In particular, the bounds we prove realize the upper bound
given in the weak form of Malle's conjecture for the transitive embedding of a
solvable group $G\subset S_n$ if we assume that for each finite abelian group
$A$ the average size of class group torsion $|{\rm Hom}({\rm Cl}(L),A)|$ is
smaller than $X^{\epsilon}$ as $L/K$ varies over certain families of extensions
with ${\rm inv}(L/K)<X$.
