Edit: Apologies, as mentioned in the comments I failed to notice the analytic algorithms that take $O(n^{1/2+\epsilon})$ time, so this question doesn’t make much sense. It’s possible there is a sensible question restricting to sieve-like algorithms, but I don’t know how to make that precise.
The fastest algorithms for computing $\pi(n)$ (counting primes up to $n$) appear to require $\tilde{O}(n^{2/3})$ time (ignoring logarithmic factors). For example, Deleglise and Rivat give an algorithm with complexity $O(n^{2/3}/\log^2 n)$, which is itself an improvement to several other algorithms with similar complexity. The two-thirds power lower bound seems to be because one needs to sieve up through $n^{2/3}$ and explicitly handle primes in that range to deal with inclusion/exclusion interactions of smaller factors.
Question: Is it possible to get a rigorous $\Omega(n^{2/3-\epsilon})$ lower bound for some natural black box generalization of $\pi(n)$?
For example, can we replace $\mathbb{N}$ by some larger class of black box arithmetic semigroups (monoids with a norm and a set of primes) such that similar algorithms work for counting primes and there is a matching rigorous lower bound?