Fixing total item count

This fixes the "Total items: null" bug in this example: http://plnkr.co/edit/4LyAek?p=preview

I haven't committed the rebuilt files because when I do that it seems to introduce a bunch of \n to the compiled .js files. However I have run the e2e tests and tested the change locally. If you merge this request, make sure you rebuild the debug and prod libraries and commit the changes.