The hilbertdimension command computes the dimension of the solution set for a Groebner basis G in the variables X. If the solutions are points the dimension is zero, if they contain a curve the dimension is 1, and so on.
A = [x^2+y, x*y-1]; G = groebnerbasis(A,[x,y]); hilbertdimension(G,[x,y]); 0