discover.py: Fix retry counter