Added setRetryCount method