The Egyptian writer Manetho divided Egyptian rulers into numbered dynasties or families. His original manuscript apparently contained 30 dynasties, and later copyists seemingly added Dynasty 31, the later Persian kings, but the Macedonian and Ptolemaic kings and Roman emperors were never part of the numbered sequence. This concept of dynastic tabulation has been followed by modern Egyptologists. The concept appears already in use during the Ramesside Period in the Turin Royal Canon.
Historical Dictionary Of Ancient Egypt by Morris L. Bierbrier
Ancient Egypt. A Reference Guide. EdwART. 2011.