The asymptotic growth of $f(x)$ defined in (1) below is $\overset{\text{~}}{f}(x)$ defined in (2) below, and $\overset{\text{~}}{f}(\frac{t}{2 \pi})$ very closely approximates the asymptotic growth of $N(t)$ defined in (3) below (the number of non-trivial zeta zeros with $0<\Im(\rho)\le t$). These relationships are illustrated following the question below.
(1) $\quad f(x)=\sum\limits_{n\le x}\log(n),\quad\zeta'(s)=-\sum\limits_{n}\log(n)\,n^{^-s}\quad\Re(s)>1$
(2) $\quad \overset{\text{~}}{f}(x)=x\,(\log (x)-1)+\frac{\log(2 \pi)}{2},\quad f(x)\approx\overset{\text{~}}{f}(x)$
(3) $\quad N(t)=\sum\limits_{0<\Im(\rho)\le t}1\approx\overset{\text{~}}{f}(\frac{t}{2 \pi})$
It's widely known the non-trivial zeros of the Riemann zeta function $\zeta(s)$ are closely related to the primes.
Question: Why is the growth of $N(t)$ so closely related to the growth of $f(x)$ where $\zeta′(s)=-s\int_0^\infty f(x)\,x^{-s-1}\,dx$, and how is $N(t)\approx\overset{\text{~}}{f}(\frac{t}{2 \pi})$ related to the primes?
The following figure illustrates $f(x)$ in blue and $\overset{\text{~}}{f}(x)$ in orange.
Figure (1): Illustration of $f(x)$ (blue) and $\overset{\text{~}}{f}(x)$ (orange)
The following figure illustrates a discrete plot of $N(t)-\overset{\text{~}}{f}(\frac{t}{2 \pi})$.
Figure (2): Illustration of $N(t)-\overset{\text{~}}{f}(\frac{t}{2 \pi})$

