I am following Stein's text and there is a minor detail which I cannot figure out. Suppose $\gamma$ is some (not necessarily closed) curve. In Stein's text he claims $\int_\gamma \frac{f'(z)}{f(z)}dz$
"can be interpreted as the change in the argument of $f$ as $z$ traverses the curve $\gamma$. Moreover, assuming the curve is closed, this change of argument is determined entirely by the zeros and poles of $f$ inside $\gamma$"
If $\gamma$ is closed it is clear why the change of argument interpretation holds, but I cannot see how or why this holds for any continuous curve $\gamma$, as the above quote suggests. Every other resource I have come across has the additional assumption that $\gamma$ must be closed.
I have already checked out Interpretation of the Argument Principle and Argument principle and change of argument, but am still not clear on the matter.