Total of array, but not .length!

I don’t need the length of an array, I need the total number of cells that contain something.

How would I go about this, the for loop I am using to check the array is not working, it’s just evaluating to the max number:

for (var i=0;i<8;i++){
if (namesArray* != “”){
newNames++;
}
}

Life is like super Mario, nobody wants to be luigi :luigi: