God sent an angel to Jerusalem to destroy it: and as he was about to destroy, Yahweh saw, and he repented him of the evil, and said to the destroying angel, It is enough; now stay your hand. The angel of Yahweh was standing by the threshing floor of Ornan the Jebusite.
"The major reason for taking a census in Israel was to lay the basis for levying taxes (Exodus 30:12; Numbers 3:40-51) or registering men for military service (Numbers 26:1-4)." [Note: Thompson, p. 160. Cf. 21:4-7.] 