Finding the positive numbers count in an ECMAScipt array

All I am trying to achieve is better use of built-in ES functions.

var arr = [0, 1, 2, 3, -1, -2, -3];

function countPositiv(p, c, i, a)
{
if(c > 0){
return p+1;
} else {
return p;
}
}

var positiv = arr.reduce(countPositiv, 0);

console.log(positiv);

• Welcome to Code Review! I hope you get some helpful reviews. – SirPython Jan 25 '16 at 23:34

var positiv = arr.reduce(function(acc, x) {

This can easily be done using filter and length. filter creates an array comprising of values where the callback returned true. In this case, when v > 0. And since filter returns an array, we have access to length.
let positiveNumbersCount = arr.filter(v => v > 0).length;