Stats - fixed bug in set of indices for chart 3

The set of unique indices that are generated for chart 3 of the stats page would potentially include invalid indices when the set of countries is too small.