Put exit_on_warn option before count_only

`exit_on_warn `option wasn't support when used together with `count_only`, since the `at_exit` hook was attached after `count_only` was triggered. Fixed.

Please review.