Solution
= Solution
A label appears in the code exactly its <vertex degree>[degree] minus one times, as proved in (i). It is a <leaf of a graph> exactly when it never appears. Therefore
$$
\boxed{l=n-\#\{\text{distinct labels appearing in the code}\}.}
$$
For example the code in (ii) uses three distinct labels, so its ten-<vertex> <tree> has seven <leaves of a graph>.