1 Chronicles 21:1-5 MSG

1 Now Satan entered the scene and seduced David into taking a census of Israel.
2 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."
3 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?"
4 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
5 and reported the results of the census: There were 1,100,000 fighting men; of that total, Judah accounted for 470,000.