(This is a response to a comment of the OP dated july 31 from my other answer and not to the main question)
Perhaps that this picture will make things clearer concerning the argument of $\zeta$ :

It represents $\ \frac 1{\pi}\rm{Arg}(\zeta(1/2+it))\ \ $ ($-\frac 1{\pi}\theta(t)$ would produce the same curve but continuous with the discontinues pieces larger than $14$ shifted down $1, 2, 3,\cdots$ units)
Note that for every zero of $\ \zeta\left(\frac 12+it\right)$ (near $14.135,\ 21.022,\ 25.011,\cdots$) we get a jump of $1$ but this jump is not at a fixed value of the argument $\bmod{2\pi}$. This implies that the $N(t)$ 'continuous zeros counting function' in your link (not exactly the argument of $\zeta$ by the way) won't have its fractional part exactly $0$ when crossing a zeta zero (i.e. $N(t)$ is used for the asymptotic proof using the argument principle so don't take the decimals of this 'number of zeros' too seriously!).
The values of $t$ such that $\ \theta(t)=n\pi\ $ (where $\zeta\left(\frac 12+it\right)$ will be real) are called the Gram points and the 'Gram law' is merely Gram's numerical observation that the zeros of the $Z$-function seem to alternate with the Gram points (on the picture $g_0\approx 17.85,\ g_1\approx 23.17,\ g_2\approx 27.67,\cdots$).
(for more see Edwards' book as well as some exceptions to the 'law')
To make a jump of $1$ exactly when crossing a zero we may use the method proposed in this link : subtract $-\theta(t)$ and $\rm{Arg}\left(\zeta\left(\frac 12+it\right)\right)$. This works because an $\rm{Arg}(z)$ function implementation will usually suppose that $z=r e^{i\phi}$ with $r\ge 0$ and $\phi$ in $(-\pi,\pi]$. So that when $z$ crosses $0$ the new small negative $r$ will be replaced by the positive $r=|Z(t)|$ and $\pi$ will be added/subtracted to the phase to take care of the change of sign. The phase will just change smoothly and furnish the 'crossing angle' at the origin where the fast radius modifications take as back as illustrated.
Orbit corresponding to $\zeta\left(\frac 12+it\right)$ in the complex plane :

I must add that the constraint $\phi \in (-\pi,\pi]$ and the possibility for $\theta(t)$ to be near $k\pi$ will sometimes revert the $\pi$ displacement (near $t=300$ and $1000$ if I remember well) but the error doesn't seem to propagate...
I hope this will clarify more,