Pope John numbering

The numbering of "Popes John" does not occur in strict numerical order. Although there have been twenty-one legitimate popes named John, the numbering has reached XXIII because of two clerical errors that were introduced in the Middle Ages: first, antipope John XVI was kept in the numbering sequence instead of being removed; then, the number XX was skipped because Pope John XXI counted John XIV twice.