Here we should check at the beginning it there is SIM Card, because without SIM Card we get the following error:

`E/GeckoConsole(  399): [JavaScript Error: "TypeError: navigator.mozSms.getSegmentInfoForText is not a function" {file: "app://sms.gaiamobile.org/js/sms.js" line: 814}]`

Probably first line in `updateCounter` should be something like 
`if(!simAvailable) return;`

For checking `simAvailable` I dont know if there is a param to be requested directly of mozMobileConnection, but asking for 'pin' results in an error if there is no SIM Card.