userinput = input("\nMr. X. Avier demands you input a string! Best not to anger him.\n> ")
XList = ["x","X"]
global count
count = 0
def countx(n):
    global count
    if type(n) == str:
        n = list(n)
    if len(n) > 0:
        if n.pop(0) in XList:
            count += 1
        countx(n)
    else:
        print("\n"+str(count)+"\n")
countx(userinput)
f07d5501a9dedc5c27654452b34c2c3b102afec8
<mask token>

<mask token>


def countx(n):
    global count
    if type(n) == str:
        n = list(n)
    if len(n) > 0:
        if n.pop(0) in XList:
            count += 1
        countx(n)
    else:
        print('\n' + str(count) + '\n')


<mask token>

<mask token>
global count
<mask token>


def countx(n):
    global count
    if type(n) == str:
        n = list(n)
    if len(n) > 0:
        if n.pop(0) in XList:
            count += 1
        countx(n)
    else:
        print('\n' + str(count) + '\n')


countx(userinput)

userinput = input(
    """
Mr. X. Avier demands you input a string! Best not to anger him.
> """)
XList = ['x', 'X']
global count
count = 0


def countx(n):
    global count
    if type(n) == str:
        n = list(n)
    if len(n) > 0:
        if n.pop(0) in XList:
            count += 1
        countx(n)
    else:
        print('\n' + str(count) + '\n')


countx(userinput)

userinput = input("\nMr. X. Avier demands you input a string! Best not to anger him.\n> ")
XList = ["x","X"]
global count
count = 0
def countx(n):
    global count
    if type(n) == str:
        n = list(n)
    if len(n) > 0:
        if n.pop(0) in XList:
            count += 1
        countx(n)
    else:
        print("\n"+str(count)+"\n")
countx(userinput)