function (keys, values, rereduce)
{
    if (rereduce)
    {
        return sum(values)
    }
    {
        /* We count one per user, not per play-event */
        return 1;
    }
}

@@ -29,16 +29,309 @@
 duce)%0A%7B%0A
+    function unique(arr) %7B%0A        var a = %5B%5D;%0A        var l = arr.length;%0A        for(var i=0; i%3Cl; i++) %7B%0A            for(var j=i+1; j%3Cl; j++) %7B%0A                if (arr%5Bi%5D === arr%5Bj%5D)%0A                    j = ++i;%0A            %7D%0A            a.push(arr%5Bi%5D);%0A        %7D%0A        return a;%0A    %7D;%0A%0A
     if (
@@ -340,16 +340,16 @@
 reduce)%0A
-
     %7B%0A  
@@ -441,16 +441,46 @@
 vent */%0A
+        val = unique(values);%0A
         
@@ -486,17 +486,26 @@
  return 
-1
+val.length
 ;%0A    %7D%0A

fix listener count in listeners_by_podcast view