Equations with infinitely many or no solutions