<script type="application/javascript">
$(document).ready(function() {
$("#smstext").on('keyup paste', function(){
var Characters = $("#smstext").val().replace(/(<([^>]+)>)/ig,"").length; // '$' is missing from the selector
$("#counter").text(Characters);
var sms = Math.ceil(Characters/70*1);
$("#smscount").text(sms.toFixed());
$("#itog").text((sms*1.74) + 'руб.');
});
});
</script>