We present the results of a high-statistics equilibrium study of the folding/unfolding transition for the 20-residue mini-protein Trp-cage (TC5b) in water. The ECEPP/3 force field is used and the interaction with water is treated by a solvent-accessible surface area method. A Wang-Landau type simulation is used to calculate the density of states and the conditional probabilities for the various values of the radius of gyration and the number of native contacts at fixed values of energy--along with a systematic check on their convergence. All thermodynamic quantities of interest are calculated from this information. The folding-unfolding transition corresponds to a peak in the temperature dependence of the computed specific heat. This is corroborated further by the structural signatures of folding in the distributions for radius of gyration and the number of native contacts as a function of temperature. The potentials of mean force are also calculated for these variables, both separately and jointly. A local free energy minimum, in addition to the global minimum, is found in a temperature range substantially below the folding temperature. The free energy at this second minimum is approximately 5 k(B)T higher than the value at the global minimum.