Number of solutions in system of equations