Wouldn't the solution be of the form a x + b = n pi, n = 0,1,2,....

Thus a1 x + b1 = a2 x + b2 if we take n = 0. Since you are looking for "common nodes" as you have explained them, the x value must be the same. Eliminating x will give, b1/a1 = b2/a2.

But you could also have a1 x + b1 = 0, while a2 x + b2 = pi. If you again eliminate x, you would get -(b1/a1) = (pi -b2)/a2. Thus the number of solutions does not look finite.