  We present a statistical mechanics approach for the description of complex
networks. We first define an energy and an entropy associated to a degree
distribution which have a geometrical interpretation. Next we evaluate the
distribution which extremize the free energy of the network. We find two
important limiting cases: a scale-free degree distribution and a finite-scale
degree distribution. The size of the space of allowed simple networks given
these distribution is evaluated in the large network limit. Results are
compared with simulations of algorithms generating these networks.
