Counting the amount of objects in an array that contain a certain key that doesn't have an empty value
Using String.replace means that you need to step over every character in every string you are testing. Not only that but it needs to allocate memory to hold the resulting new string.

Its much quicker if you test for a non white space characters. That way it need only test to the first non white space, and it needs no additional memory.

Also Object.hasOwnProperty is slow as it must work its way up the prototype chain to get an answer and should only be used if you think that the object you are testing has a prototype chain containing the property name you are testing.

Last point. This is not part of the code you have presented, but to improve the performance the property hour.description should not contain only white spaces. When you set that property vet it eg  hour.description = descriptionString.trim();

Thus If you have unvetted description strings

var i, count = 0;
for (i = 0; i &lt; hours.length; i++) {
    count += hours[i].description &amp;&amp; (/\S/).test(hours[i].description) ? 1 : 0;
}
return count;


Or

If the description has been vetted then the following will be the quickest

var i, count = 0;
for (i = 0; i &lt; hours.length; i++) {
    count += hours[i].description ? 1 : 0;
}
return count;