A Midrash taught that the Israelites were counted on ten occasions: (1) when they went down to Egypt, (2) when they went up out of Egypt, (3) at the first census in Numbers, (4) at the second census in Numbers, (5) once for the banners, (6) once in the time of Joshua for the division of the land of Israel, (7) once by Saul, (8) a second time by Saul, (9) once by David, and (10) once in the time of Ezra.