The prime counting function $\pi(x)$ counts the number of primes less than a given $x$. There are other counting functions like Chebyshev's functions which count sums of logarithms of primes up to a given magnitude as well.
I am wondering why this summatory function (which is similar to Chebyshev's functions) over primes $p$ $$f(x)= \sum_{p \le x} e^{\frac{1}{p\log p}} $$ so closely approximates $\pi(x)$. For example, I wrote some python code that tells me $f(x)-\pi(x)<2$ for $x<10^7$.
Are there heuristics to support that $f(x)$ closely approximates $\pi(x)$?
I suspect $f(x)-\pi(x)$ grows slowly like $\log \log x$ or maybe even is bounded above by a constant. Thanks.