If the polynomials S are members of a commutative affine polynomial (finite number of variables) ring, then there is a very classical way of computing the dimension of the solution set. One uses the Krull dimension or trancendance degree which are the same for affine commutative algebras. Daniel Lichtblau at Mathematica has written code that will do this.