FrequencyCounts First cut

FrequencyCounts First cut using Mesr Gries algorithm