Python email churn project

Please tell me what is wrong with this code as I am getting error count of lines is wrong
But I tried many times by modifying my code it gave same ans

I tested with the same code. It worked fine.
Could you ensure that there is only window that is open?