Now Satan entered the scene and seduced David into taking a census of Israel.
David gave orders to Joab and the army officers under him, "Canvass all the tribes of Israel, from Dan to Beersheba, and get a count of the population. I want to know the number."
Joab resisted: "May God multiply his people by hundreds! Don't they all belong to my master the king? But why on earth would you do a thing like this - why risk getting Israel into trouble with God?"
But David wouldn't take no for an answer, so Joab went off and did it - canvassed the country and then came back to Jerusalem
and reported the results of the census: There were 1,100,000 fighting men; of that total, Judah accounted for 470,000.
Joab, disgusted by the command - it, in fact, turned his stomach! - protested by leaving Levi and Benjamin out of the census-taking.
And God, offended by the whole thing, punished Israel.
Then David prayed, "I have sinned badly in what I have just done, substituting statistics for trust; forgive my sin - I've been really stupid."