Here we code the coin counting.