Python Count How Many Occurrences Make A Pattern