  Courant theorem provides an upper bound for the number of nodal domains of
eigenfunctions of a wide class of Laplacian-type operators. In particular, it
holds for generic eigenfunctions of quantum graph. The theorem stipulates that,
after ordering the eigenvalues as a non decreasing sequence, the number of
nodal domains $\nu_n$ of the $n$-th eigenfunction satisfies $n\ge \nu_n$. Here,
we provide a new interpretation for the Courant nodal deficiency $d_n =
n-\nu_n$ in the case of quantum graphs. It equals the Morse index --- at a
critical point --- of an energy functional on a suitably defined space of graph
partitions. Thus, the nodal deficiency assumes a previously unknown and
profound meaning --- it is the number of unstable directions in the vicinity of
the critical point corresponding to the $n$-th eigenfunction. To demonstrate
this connection, the space of graph partitions and the energy functional are
defined and the corresponding critical partitions are studied in detail.
