Find the number of solutions to the equation
\[\frac{1}{(7 - x)(1 + x)(1 - x)} + \frac{3x^2 - 18x - 22}{(x^2 - 1)(x - 7)} + \frac{3}{x - 2} = \frac{3}{(x - 1)(x - 2)}.\]
from sympy import Symbol, Eq, solve

x = Symbol('x')

eq = Eq( (1 / ( (7 - x) * (1 + x) * (1 - x) )) + ( (3*x**2 - 18*x - 22) / ( (x**2 - 1) * (x-7) ) ) + 3/(x - 2) , 3 / ( (x - 1) * (x - 2) ) )

answer = len(solve(eq, x))

print(answer)