The simplest method, that will usually be correct, is to just use NSolve.
polys = {x^2 y + 2 x y + 2, y^3 + 2 x + 1}; Length[NSolve[polys]] (* Out[421]= 7 *)
Below is from code I have used for solution counting and related (it is related to code inside NSolve, to answer the question of "Why not just use NSolve?"). Some is also used in this MSE response. The underlying method is described in Gröbner Bases: A Computational Approach to Commutative Algebra, by T. Becker and V. Weispfenning (with H. Kredel).
normalSet[elist_List, maxlist_, nvars_Integer] /; Length[elist] == nvars := Module[{jj, indices, iterators}, indices = Array[jj, {nvars}]; iterators = Table[{indices[[j]], 0, maxlist[[j]] - 1}, {j, nvars}]; Flatten[Table[indices, Evaluate[Apply[Sequence, iterators]]], nvars - 1]] getRoofTuples[elist_, height_] := Module[{len = Length[elist], expvec, expvecs, tt, rest}, expvecs = tt[]; Do[expvec = elist[[jj]]; If[expvec[[height]] =!= 0 && (height === 1 || Max[Take[expvec, height - 1]] === 0), expvecs = tt[expvec, expvecs]], {jj, len}]; expvecs = Apply[List, Flatten[expvecs, Infinity, tt]]; rest = Complement[elist, expvecs]; expvecs = Map[Drop[#, height - 1] &, expvecs]; {expvecs, rest}] isUnder[t1_, t2_] := Apply[And, Thread[t1 <= t2]] hitRoof[tup_, roofs_] := Module[{jj, len = Length[roofs]}, For[jj = 1, jj <= len, jj++, If[isUnder[roofs[[jj]], tup], Return[True]]]; False] normalSet[elist_List, maxes_, nvars_Integer] := Module[{tuples, ntups, tuple, ntup, mixedexpons, tt}, mixedexpons = Select[elist, (Max[Apply[Sequence, #]] != Apply[Plus, #]) &]; tuples = Table[{j}, {j, 0, maxes[[nvars]] - 1}]; Do[{roofs, mixedexpons} = getRoofTuples[mixedexpons, jj]; ntups = tt[]; Do[tuple = tuples[[kk]]; ntups = tt[Prepend[tuple, 0], ntups]; Do[ntup = Prepend[tuple, mm]; If[hitRoof[ntup, roofs], Break[], ntups = tt[ntup, ntups]], {mm, maxes[[jj]] - 1}], {kk, Length[tuples]}]; tuples = Flatten[ntups, Infinity, tt], {jj, nvars - 1, 1, -1}]; Sort[Apply[List, tuples]]] solutionSetSize[polys_, vars_] := Catch[Module[{lv = Length[vars], leadvecs, dtl, maxes, nset, pureterms}, gb = GroebnerBasis[polys, vars, MonomialOrder -> DegreeReverseLexicographic]; dtl = First[ GroebnerBasis`DistributedTermsList[gb, vars, MonomialOrder -> DegreeReverseLexicographic]]; leadvecs = Map[#[[1, 1]] &, dtl]; pureterms = Select[leadvecs, Count[#, a_ /; a =!= 0] === 1 &]; If[Length[pureterms] < lv, Throw[Infinity]]; maxes = Apply[Plus, pureterms]; nset = normalSet[leadvecs, maxes, lv]; Throw[Length[nset]] ]]
Back to the example:
solutionSetSize[polys, {x, y}] (* Out[423]= 7 *)
{x^2 y + 2 x y + 2 == 0, y^3 + 2 x + 1 == 0}But the question is not about solving this particular system. $\endgroup$