When a liquid is cooled below its melting temperature, if crystallization is avoided, it forms a glass. This phenomenon, called glass transition, is characterized by a marked increase of viscosity, about 14 orders of magnitude, in a narrow temperature interval. The microscopic mechanism behind the glass transition is still poorly understood. However, recently, great advances have been made in the identification of cooperative rearranging regions, or dynamical heterogeneities, i.e., domains of the liquid whose relaxation is highly correlated. The growth of the size of these domains is now believed to be the driving mechanism for the increase of the viscosity. Recently a tool to quantify the size of these domains has been proposed. We apply this tool to a wide class of materials to investigate the correlation between the size of the heterogeneities and their configurational entropy, i.e., the number of states accessible to a correlated domain. We find that the relaxation time of a given system, apart from a material dependent prefactor, is a universal function of the configurational entropy of a correlated domain. As a consequence, we find that, at the glass transition temperature, the size of the domains and the configurational entropy per unit volume are anticorrelated, as originally predicted by the Adam-Gibbs theory. Finally, we use our data to extract some exponents defined in the framework of the random first-order theory, a recent quantitative theory of the glass transition.