Code to get started on making a honeybee counter for your hive from a pair of Sparkfun Photointerrupters https://www.sparkfun.com/products/9299