  Production of open and hidden charm hadrons in heavy ion collisions is
considered within the statistical coalescence model (SCM). Charmed
quark-antiquark pairs are assumed to be created at the initial stage of the
reaction in hard parton collisions. The number of these pairs is conserved
during the evolution of the system. At hadronization, the charmed (anti)quarks
are distributed among open and hidden charm hadrons in accordance with laws of
statistical mechanics. Important special cases: a system with a small number of
charmed quark-antiquark pairs and charm hadronization in a subsystem of the
whole system are considered.
  The model calculations are compared with the preliminary PHENIX data for
J/psi production at RHIC. Possible influence of the in-nuclear modification of
the parton distribution functions (shadowing) on the SCM results is studied.
