retry.py: PEP8-ify the code

This is mainly whitespace, indentation and if style fixes.
retry.py: add -c/--count logic for testing pass rates