Let us suppose that we have a system of equations including trigonometric expressions in $\phi$ and we want to bound the number of possible solutions.
If I apply the Weierstrass substituition $t=\tan(\phi/2)$ I come up with a system in $t$ . If $\phi=\pi$ was a solution, there will be no corresponding t (only $t -> \infty$).
The number of possible solutions can be [the degree of the polynomium in t] + 1 (i.e. $\phi=\pi$).
For example
$sin(\phi)=0$
$\frac{2t}{1+t^2}=0$
and we get only t=0 (we see that $\lim_{t->\infty}=0$ as well)
As a workaround, I use the substitution $\phi=\phi'+\epsilon$,$t'=tan(\phi'/2)$ and leave $\epsilon$ as a parameter, so that I can "rotate" all the solutions (if they are finite) in a way that none falls in $\pi$.
Is there a more elegant solution?