updates the error counters