Prime-counting upper bound from a primorial estimate
= Prime-counting upper bound from a primorial estimate
If $P(X)\leq A^X$ for every $X\geq1$, where $A>1$, then
$$
\pi(X)\leq(1+2\log A)\frac{X}{\log X}
$$
for $X\geq2$. Every prime in $(\sqrt X,X]$ contributes at least $\sqrt X$ to the <primorial>, so
$$
(\sqrt X)^{\pi(X)-\pi(\sqrt X)}\leq P(X)\leq A^X.
$$
Taking logarithms, using $\pi(\sqrt X)\leq\sqrt X$, and observing that $\log X\leq\sqrt X$ for $X\geq2$ proves the claim.