Javascript Count Array Of Objects By Size