added Arrays.count/groupBy