Javascript Count Array Of Objects In Python