Measurement of charm production in neutrino charged-current interactions