Another fix to role counts in api statistics