fixed counting bug in CompoundAdapter, please test your code if you have relied on the previous error