The new API allows to check if the number of check failures satisfies
a certain condition. The report_errors function returns test_report,
which allows to obtain the error count. It also protects against
unintended comparisons to the error count, which was a misconception
before.
Also added a get_error_count function to explicitly query for the current
number of errors.