Find the number of distinct real roots of the following equation:

$$x^2 + \frac{9x^2}{(x + 3)^2} = 40$$

Provide your answer as an integer.

Let's think step by step and output the final answer within \boxed{}.
user