Clean up Country stats library

As with prior commit -- move most of responsibility from Stats modules
to models. Most of the stats are to do with counting relations, etc. so
the relations are handled by the model, and the decision to count is
handled by the controller.