Quote: The rapidly declining health of Pope John Paul II makes one recall a prophecy delivered in 1963 at Garabandal, Spain. One of the then 14-year-old peasant visionaries, when informed of the death of Pope John XXIII, said: "Now only three popes are left", and, "one of those popes will have a very short reign". A few months later she reffirmed that the Blessed Virgin told her that "there will only be two more popes after Pope Paul VI". Pope John Paul I was the pope with the very short reign (1 month in 1978), thus verifying the visionary as a prophet of God (Deut. 18:21), and Pope John Paul II is that third pope. Unquote.
Someone else posted part of the Fatima prophecy (I think) that may be what you are thinking of.
An older and perhaps better known prophecy on the popes is that of St. Malachi.
Maelmhaedhoc OMorgair (latinized to Malachy) was born in Armagh, Ireland in 1094. In 1148, he died in the company of St. Bernard of Clairvaux, who was writing his biography (at the request of the Abbot of Mellifont.). This saint has become very well known on account of the prophecies he allegedly made regarding 112 future popes, while on a trip to visit to Pope Innocent II in Rome in 1139-40.
More about it at this link
According to this writing there is only to be two (or perhaps one) more popes. One is "Glory of the Olive" and the other "Peter of Rome". Here is some speculation on this: Future Pope?