Added a feature to count the total amount of tests that failed

After all iterations are finished, it prints the total amount of failed tests in command line.