Better implementation of counts using collections.Counter