The practice of conducting a periodic census began in Egypt in the second millennium BC, where it was used for tax gathering and to determine fitness for military services. Pre-modern censuses Pharaonic era Censuses in Egypt first appears in the late Middle Kingdom and develops in the New Kingdom. Pharaoh Amasis, according to Herodotus, required every Egyptian to declare annually to the nomarch, "whence he gained his living". Under the Ptolemies and the Romans several censuses were conducted in Egypt by government officials. Roman era Roman censuses in Egypt estimated the population at 4.5 million inhabitants in the year 14 AD and 5 million in 164 AD. Islamic era (600 AD) A census also took place in the era of Hesham Abdel Malek ben Marwan in the year 600 AD including the number of people, their ages and residences. Napoleonic era (1798) In 1798, Egypt's population was estimated at 3 million when Napoleon invaded the country. 1848 and 1868 Censuses After preliminary enumerations in some urban areas and villages the first countrywide census was carried out in 1848. A modern analysis of the 1848 census records, which attempts to adjust for various discrepancies in the data, concluded that Egypt's population was 4,476 million people back then. The 1848 census is said to be the first in a non-Western country to include demographic, social, and economic data on practically all individuals including females, children, and slaves. Digitization of the 1848 and 1868 census records is underway based on documents in the National Archives of Egypt. Modern censuses Censos de población During the last 135 years, Egypt has managed to carry out around 14 official population censuses, the first being in 1882 and the last in 2017. 1882 1882 — The first census in Egypt had been carried out. The total population was 6.7 million. 1947 According to the 1947 census, Egypt's population had reached 19 million inhabitants. 1976 A census in 1976 revealed that the population had risen to 36.6 million. 1986 In 1986, a census indicated that the population of Egypt reached a total of 50.4 million, including about 2.3 million Egyptians working in other countries. 1996 In 1996, the census found a population of 59.3 million. 2006 In 2006, the thirteenth census in the Egyptian census series revealed that the Egypt's population hit 76.5 million inside and outside the country. 2017 A new census was done in 2017. Census