Keep in mind that there aren't 9,999 AA flights, but with codesharing, several flights have multiple numbers in the system. Delta does the AAA-BBB-AAA same number system on many of their flights as well. US used to do this on some of their express flights - not sure why as I'm sure there were plenty of numbers to go around back then. But I do recall seeing that I was checked in as sequence 75 on a 50-seat flight once and that confused me (because the first 50 were on the inbound flight and I was on the outbound).