/u/Valkine goes into some detail in this post as to how King Edward became recognised (retrospectively) as 'Edward I'.
It's worth noting that, if we were to be consistent, Edward I wouldn't become Edward II, but in fact Edward IV, as Edward the Confessor was preceded by two other Edwards: Edward 'the Elder', son of Alfred and father of Æthelstan, and Edward 'the Martyr', son of Eadgar and half-brother to Æthelred II 'the Unready'.