$f_n(x)$ is equal to number of $n$'s in $x$'s prime factorization. Or, put differently:
$$x = \prod_{i=1}^mp_i^{e_i}, \quad f_{p_i}(x) = e_i$$
I'd like to know if there is notation for this, so that I don't have to define and use some function in my math.
For clarity, here's an example: $f_2(12) = 2$, because $12 = 2^2 \times 3$.
A relatively standard function used for this is the $p$-adic order function. One thing to note, though, is that it's written using
\nu(i.e., the Greek letter), e.g., $\nu_p(n)$, instead of the similar lookingv, e.g., $v_p(n)$. Thus, your example could be written as $\nu_2(12) = 2$.