How to find the the number of distinct values of function for a given value of z?

How many distinct values can the following function take at a given value of z ? $$f(z)=\sqrt{\frac{z^2-1}{\sqrt{z}}}(z-i)^{1/3}$$

The answer is given to be 12.

My method (kind of vague): At first I tried to remove the square roots and cube roots on the right hand side by squaring two times and cubing one time, which results in: $$[f(z)]^{12}=\frac{(z^2-1)^6}{z^3}(z-i)^{4}$$ I don't know any theorem, then I just concluded that if the f(z) has power equal to 12 than it will have 12 distinct roots. I think it is just a coincidence. I tried to google it, which increased my confusion.


Solution 1:

Another was to analyze the exercise is this:

For a given $z$, there are two values of $\sqrt{z}$, and thus two values of $\dfrac{z^2-1}{\sqrt{z}}$.

For each of those two values there are two values of $\sqrt{\dfrac{z^2-1}{\sqrt{z}}}$, so four altogether.

Then there are three values of $(z-i)^{1/3}$ making a total of $4\times3=12$ possible values.