Update sms_counter.js.coffee

Some fixes to convert to javascript