Added counts to returned JSON.
Merge remote-tracking branch 'origin/master' into back-end-working