Add result counts to statistics pages and rearrange legend on graph