counting bug