I want to make a can counter

Do you have a sensor in mind? To count cans you need to detect cans and you make no mention of your setup? Cans passing on a conveyor? Cans by weight? You need to provide much more information if you expect help.

Ron