Find the number of solutions to a linear equation