Given three sets $P, Q, R$ such that $|P|=p, |Q|=q, |R|=r,$ and $p,q,r > 1$ let $f(x): P\rightarrow Q$, and $g(x):Q\rightarrow R$ be two functions.
Find the number of functions which can be composed using $g(x)$, and $f(x)$ respectively (find the functions in the form $h(x)=g(f(x))$)
I don't even know where to start with this one, is there a formula for counting compositions that i'm not aware of, or should i just create random cases and see if there is a general number of compositions.