If you want to check the `retryCount` for this specific case, you need to make a check among the possible `cardStates`, which are networkLocked, corporateLocked, serviceProviderLocked, so you could use something like this (not tested, just example):
```javascript
switch (cardState) {
  case 'networkLocked': 
    lock = 'nck';
    break;
  case 'corporateLocked':
    lock = 'cck';
    break;
  case 'serviceProviderLocked':
    lock = 'spck';
    break;
}
var req = this.icc.getCardLockRetryCount('puk');
req.onsuccess = (function sm_getCardLockRetryCountSuccess() {
  if (req.result.retryCount)
    retryCount = req.result.retryCount;
}
```