Python Count Array Elements