Cast the retrieved `retries` var to an int before incrementing as it may be in string form.

For example, the following method of calculating the value will result in a type error:

    appstatus_waitfor: 4  # Minutes
    appstatus_delay: 5 # seconds
    appstatus_retries: "{{ mins * 60 / delay }}"
Merge pull request #5212 from tarka/devel

Cast the retrieved `retries` var to an int before incrementing as it may...