Let \(\mathbb {P}\) denote the set of all prime numbers, and let \(\textbf{1}_{\mathbb {P}}(n)\) be its characteristic function. Define \( S_{\textbf{1}_{\mathbb {P}}}(x):=\sum _{n \leqslant x}\textbf{1}_{\mathbb {P}}\left( \left[ \frac{x}{n}\right] \right) ,\; \text {as} \; x\rightarrow \infty \) . In this paper, we establish an asymptotic formula for \(S_{\textbf{1}_{\mathbb {P}}}(x)\) with an error term of \( O(x^{5/11+\varepsilon }) \) , thereby improving the previous result of Zhai. Acta Math. Sin. (Engl. Ser.) 40(10), 2497–2518 (2024).