AngularJS Example:

HTML

<div ng-app="todoApp">
 
  <div ng-controller="TodoController">
      <h2>{{todoText.length?get()+" раз":0+" раз"}}</h2>

      <input type="text" ng-model="todoText"  size="30"
             placeholder="add new todo here">
     
   
  </div>
</div>

CSS

</style> <!-- Ugly Hack due to jsFiddle issue: http://goo.gl/BUfGZ --> 
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.0.4/css/bootstrap-combined.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
<style>
.done-true {
  text-decoration: line-through;
  color: grey;
}

JavaScript

angular.module('todoApp', [])
  .controller('TodoController', ['$scope', function($scope) {
    var i=0;
      $scope.get=function(){
          
          return i++;
      }
  }]);