We study the production of charmonia and charmed hadrons for nucleus-nucleus collisions at SPS, RHIC, and LHC energies within the framework of the statistical hadronization model. Results from this model are compared to the observed centrality dependence of J/ψ production at SPS energy. We further provide predictions for the centrality dependence of the production of open and hidden charm mesons at RHIC and LHC.