Counting of objects carried by a conveyor