Let $h$ be a multiplicative function defined by $h(p^k)=k$ for all prime powers $p^k$. Then you are trying to calculate the mean value of $h$, and we have that:
Theorem: $$\sum_{n\leq x} h(n)=x\frac{\zeta(3)\zeta(2)}{\zeta(6)} + O\left(\sqrt{x}\right),$$ where $\zeta$ is the Riemann zeta function and
where the error term uses Big-O notation, meaning it is at most $C\sqrt{x}$ for some constant $C>0$.
This can be done using the general method in this answer:
On the mean value of a multiplicative function: Prove that $\sum\limits_{n\leq x} \frac{n}{\phi(n)} =O(x) $
The idea is that since $h$ is "very close" to $1$, $f=\mu*h$ will be very close to zero, where $\mu$ is the Mobius mu function, and $*$ represents Dirichlet convolution. In particular, computing the Mobius inversion, we have $f(p)=0$, $f(p^k)=1$ for $k\geq 2$, and $(1*f)=h$.
From the method in the above answer, we have
$$\sum_{n\leq x} h(n)=\sum_{n\leq x} (1*f)(n)=\sum_{n\leq x}\sum_{d|n}f(d)=\sum_{d\leq x} f(d)\left[\frac{x}{d}\right]$$ and using $[z]=z+O(1)$ this is $$=x\sum_{d\leq x} \frac{f(d)}{d}+O\left(\sum_{d\leq x} |f(d)|\right).$$
Thus it follows that
$$\sum_{n\leq x} h(n) = x\sum_{d}\frac{f(d)}{d}+O(\sqrt{x}),$$
and hence the mean value is $$\sum_{d}\frac{f(d)}{d} = \prod_{p}\left(1+\frac{1}{p(p-1)}\right)$$
where the final form is an Euler-product. The Euler product can be rearranged as
$$\prod_{p}\left(1+\frac{1}{p(p-1)}\right)=\prod_{p}\left(\frac{p^{2}-p+1}{p(p-1)}\right)$$
$$=\prod_{p}\left(\frac{p^{2}-p+1}{p(p-1)}\right)=\prod_{p}\left(\frac{p^{6}-1}{p(p^{2}-1)(p^{3}-1)}\right)=\frac{\zeta(3)\zeta(2)}{\zeta(6)}.$$
See also this list of similar questions using the same technique: