return the proper number of errors