Number of solutions to systems of equations