SP.UpgradeInfo.retryCount property (sp.js)

The number of times the site collection upgrade was attempted.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

var value =SP.UpgradeInfo.get_retryCount()

Return value

NUMBER