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 inv\((L/K)<X\) for a general invariant "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 \(\ell\)-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 \(|\text{Cl}(L)[\ell]|\ll D_{L/\mathbb{Q}}^{\epsilon}\) for extensions \(L/K\) of degree bounded above by some constant \(N(G)\) depending only on the group \(G\).