Tally using Angular.js