Currently, I got an array like that:
var uniqueCount = Array();
After a few steps, my array looks like that:
uniqueCount =
var counts = {}; your_array.forEach(function(x) { counts[x] = (counts[x] || 0)+1; });