5. $\mathrm{C}$

Among them, (1) is correct; (2) $f(g(x))$ is not necessarily a periodic function, so it is incorrect; (3) is not necessarily true, hence incorrect; (4) is correct. Therefore, the answer is C.
5. Given that $f(x)$ is a periodic function, and $g(x)$ is not a periodic function.
(1) $[f(x)]^{2}$ must be a periodic function;
(2) $f(g(x))$ must be a periodic function;
(3) $\sqrt{g(x)}$ must be a non-periodic function;
(4) $g(f(x))$ must be a periodic function.

The number of correct statements is ().
A. 0
B. 1
C. 2
D. 3