Fixed Error in Counting