counting function , fill a vacancy machine(weighing rejection)