I think you are confusing the prophecies of St. Malachy (1094-1148). He foretold a described a specific number of popes would come before Christ would return. Some people have tried to include certain anti-popes in the numeration so that Pope Francis would come out as the last Pope before the Second Coming.
We do not even know if these prophecies are valid anymore. Mystics have repeatedly said that future events and even the time of the Second Coming have been changed and delayed through the prayers of the faithful. Many scholars who have studied the prophecies have said that it is very possible that there is meant to be more popes between the second to last prophesied pope, “The glory of the olive”, identified as Benedict XVI, and the pope immediately before the Second Coming.