Python Count How Many True In Array In Javascript