Count All Elements In Array Javascript Mdn Set Attribute Dom