Edit The original diagonalization argument function I gave didn't satisfy the inequality. The following answer works.
A diagonalization argument works here to show there aren't! Take an enumeration $X_n$ of all curves defined over the integers (it is easy to write down a computable such) and let $f(p_n) = |X_n(\mathbb{F}_{p_n})|+1$.$$f(p_n) = \begin{cases} p_n, &|X_n(\mathbb{F}_{p_n})| \neq p_n\\ p_n+1, & \mathrm{else}\end{cases}.$$