There are about five really bad (meaning evil, not meaning ineffective) Popes. But the quantity is irrelevant - one evil Pope presents the same problem as 100. So never squabble over numbers - it dilutes the conversation. Accept whatever number they throw out - it doesn’t matter.
Never try to deflect criticism about bad Popes, because history is against you. They were bad and they were Popes, and this is the simple truth of the matter, so never try to explain it away or minimize it. You need to confront it and explain why it doesn’t matter.
In a way, these bad Popes have done Catholic apologists a favor. It is this favor that you need to point out to your detractors.
The Church says that a Pope may infallibly teach Doctrine, but is not personally sinless. Anti-Catholics reason that, if we can have an evil Pope, he can teach an evil Doctrine, which the Church is obliged to accept.
The Church teaches that evil Popes are prevented by the Holy Spirit from teaching evil doctrine. If we had never had any evil Popes, it would be difficult to demonstrate this teaching. We have had evil Popes, but not one of them has ever tried to codify his sins into Doctrine. That, in itself, is pretty amazing.
You have to take the bad history with the good, but this is the good part - the Holy Spirit has prevailed. Ask them to show, from any reputable historic record, where ANY of these Popes EVER taught sin as Doctrine. They can’t.
I might add that Jesus prepared us for this:
Then Jesus spoke to the crowds and to His disciples, saying: "The scribes and the Pharisees [we would say Bishops and Popes] have seated themselves in the chair of Moses* [we would say Peter]*; therefore all that they tell you, do and observe, but do not do according to their deeds; for they say one thing but do another. [Matt 23:1-3]
Yes, we should obey what they
teach, but not follow after their evil deeds.
Jesus said that. And that is what we do - we accept the
teaching of the Church (but not the sins of Her members, or even of Her Popes).