Count Objects in an image

Is it possible to utilize a camera such as an IP camera or even a webcam to capture an image of a tray (like a muffin pan) on a moving conveyor and and count the number of organized product in the tray as it moving down the conveyor? If this is possible, I would appreciate any suggestions.

It is theoretically possible to use the OpenCV support in my Image Streamer module to do such things. Most people just use professional Machine Vision devices. (Cognex, Keyence, Omron, many others.)