Array.prototype.filter takes in a predicate function, and runs it for every element in the array, if the predicate returns true, the element is kept, but if not, the element is removed.
So, c is the length of the array returned by Array.prototype.filter.
grep iterates over list @x and calls function p() on $_ (the context variable). If p() yields true, then the list member is counted. In list context, the members would be returned. In scalar context, only the count is returned. $c is a scalar,