# Number of copies of irreducible unitary representation in $L^2(G)$ for compact group $G$?

Peter-Weyl Theorem is concerned with expressing $L^2(G)$ as closure of direct sum of subspace generated by irreducible unitary representation. Every irreducible representation on a compact group is finite dimensional. Why $L^2(G)$ has exactly subspace with dimension number of copies of corresponding irreducible unitary representation? I have problem with investigating why there are no more copies !!