counting Python program altered