Some example:

$27=3\cdot 3\cdot 3$, hence $p(27)=1$;

$26=2\cdot 13$, hence $p(26)=2$.

I tried to solve the problem by matlab. And I've found that $\max\limits_{1\leqslant n\leqslant 10^k}\quad p(n)=k+1$ by some test. Then for any $n$, there exists a $k\in\mathbb{N}$ so that $n<10^k$. Hence, $\frac{1}{n}\leqslant \frac{p(n)}{n}\leqslant \frac{10^k}{n}$, $\lim\limits_{n\to\infty}\frac{p(n)}{n}=0$.

The question is : How to prove my guess? In other words, why $\max\limits_{1\leqslant n\leqslant 10^k}\quad p(n)=k+1$?