Python Count Elements In An Array