Using the identity
$$\tan^{-1}a+\tan^{-1}b=\tan^{-1}\left(\frac{a+b}{1-ab}\right)$$
(valid after checking the principal values), the left-hand side becomes
$$\tan^{-1}\left(\frac{\frac{x}{1+2x^2}+\frac{x}{1+6x^2}}{1-\frac{x^2}{(1+2x^2)(1+6x^2)}}\right)$$
Simplifying,
$$\frac{\frac{x(2+8x^2)}{(1+2x^2)(1+6x^2)}}{\frac{1+7x^2+12x^4-x^2}{(1+2x^2)(1+6x^2)}}=\frac{2x(1+4x^2)}{1+6x^2+12x^4}$$
Hence the left-hand side is
$$\tan^{-1}\left(\frac{2x(1+4x^2)}{1+6x^2+12x^4}\right)$$
Now for the right-hand side,
$$\tan^{-1}(2x)-\tan^{-1}\left(\frac{x}{2}\right)=\tan^{-1}\left(\frac{2x-\frac{x}{2}}{1+x^2}\right)$$
$$=\tan^{-1}\left(\frac{3x}{2(1+x^2)}\right)$$
Since both arguments lie in the principal range, equate the arguments:
$$\frac{2x(1+4x^2)}{1+6x^2+12x^4}=\frac{3x}{2(1+x^2)}$$
Cross-multiplying,
$$4x(1+4x^2)(1+x^2)=3x(1+6x^2+12x^4)$$
$$x\Big(4(1+5x^2+4x^4)-3(1+6x^2+12x^4)\Big)=0$$
$$x(1+2x^2-20x^4)=0$$
Thus,
$$x=0$$
or
$$20x^4-2x^2-1=0$$
Let
$$y=x^2$$
Then
$$20y^2-2y-1=0$$
$$y=\frac{2\pm\sqrt{84}}{40}=\frac{1\pm\sqrt{21}}{20}$$
Only
$$y=\frac{1+\sqrt{21}}{20}>0$$
is admissible.
Hence
$$x=\pm\sqrt{\frac{1+\sqrt{21}}{20}}$$
Together with
$$x=0$$
there are
$$3$$
real solutions.
Therefore, $$\text{Answer}=3$$.