Ion counting technique for studying multiphoton ionization processes