Most counting machines use the size of the coins to determine which coins go where. Usually, there is an opening at the top where you put bunches of mixed-up coins through, and there is a slant on which the coins slide down. The first hole built into the slant is the dime hole. Because the dimes are the smallest, only they will fall into the hole, while all the rest skip by. The penny hole is next, followed by the nickel hole, the quarter hole and finally the half dollar hole. So if you put in a quarter, it will not fit into the dime, penny or nickel hole; it will slide over them and fall into the first hole that it fits into, which is the quarter hole.
Many machines today can measure how many coins are in each slot by their weight. After the scale calculates the weight and determines the value, it sends the information to a processing unit, which displays the total value.
Today, many machines are using newer technology that can determine which coin is which faster and more accurately. Modern machines use beams of light and light receptors that are adjacent each other. When a coin passes by, the light is obstructed, thus verifying that a coin has been dropped. The machines then use weight and size to confirm their calculations, and the totals are sent to a processing unit, where they displayed for the person using the machine.