Refactor flycheck-count-errors to count all error levels