A word count in AngularJS