Added counter for records that caused an error.