Can you add `counter` to the https://github.com/mozilla-b2g/gaia/blob/64906f3/apps/sms/js/thread_ui.js#L38-L46 and use `this.counter` instead of querying every time?