corrected the count of items to update for duplicate books