Count how many if is true

I am trying to count how many times if testListTwo(list1_copy) == True but I cant get it to work.
Could someone please help me? Everything is working expect

count = count +1
sys.stdout.write(str(count))
sys.stdout.flush()   
def test(list_main, list_2):
    list1_copy= list_main
    count = 0
    for a in list_2:
        if testListOne(list1_copy, a) == False:
            list1_copy.append(a)

            if testListTwo(list1_copy) == True:
                
                count = count +1

            del list1_copy[-1]
            sys.stdout.write(str(count))
            sys.stdout.flush()   

I would check what does testListTwo really returns with a print.
What is more, you can check the inputs like this, it is not as strict as yours, but still does the work.

count += 1
sys.stdout.write(str(count))
sys.stdout.flush()

def test(list_main, list_2):
    list1_copy= list_main

    for a in list_2:
        if not testListOne(list1_copy, a):
            list1_copy.append(a)

            _result = testListTwo(list1_copy)
            print(_result)  # print out the result for the time of debuging.
            if _result:
                count += 1

            del list1_copy[-1]
            sys.stdout.write(str(count))
            sys.stdout.flush() 

thank you so much. it helped me to solve it