Boolean is not a keyword, it is a function, and functions are just objects, that you can pass around. It is the same as:
return arrayOfSheeps.filter(function(x){return Boolean(x)}).length;
Since function(x){return f(x)} === f then you can simplify:
return arrayOfSheeps.filter(Boolean).length;