The assessment of the near infrared identification of carbon stars. I. The Local Group galaxies WLM, IC 10 and NGC 6822