Python Array Count Method In Javascript Object Iterate