Count Objects In Array Javascript Mdn Math