[javascript] Count of "Defined" Array Elements