Let \(\displaystyle S=\left[-\pi,\dfrac{\pi}{2}\right)-\left\{-\frac{\pi}{2},-\frac{\pi}{4},\frac{3\pi}{4},\frac{\pi}{4}\right\} \). Then the number of elements in the set \( A=\left\{\theta\in S:\tan\theta\left(1+\sqrt{5}\tan(2\theta)\right)=\sqrt{5}-\tan(2\theta)\right\} \) is _______________.