 
       recount = attrs.counterRestart or false
       max = scope.$eval(attrs.counterMax)
+      timeoutPromise = null
 
       scope.$watch max, (value)->
         if max isnt undefined

      updateElement = (value)->
        $(element)[0].text parseInt(value)

]

          restart()

      restart = ->
        timeoutPromise = $timeout animate, 200

      tweenable = new Tweenable()
      animate = ->
