Count failed tests properly