The energy histogram method, introduced by Ferrenberg and Swendsen [Phys. Rev. Lett., 61, 2635, (1988) and 63, 1195, (1989)], was applied for the first time to the constant temperature molecular dynamics (MD) simulation of a two-dimensional (2D) system with incommensurate structures. We performed MD simulations for the stage-2 graphite intercalation compounds (GIC's) with Rb or K being the intercalants (Rb-GIC's and K- GIC's). The temperature dependence of the specific heat, Cv, is calculated for various sizes up to 864 atoms. The melting temperature was found to be 158 K for Rb-GIC's and 119 K for K-GIC's, respectively, which are in agreement with the experimental observations.