1 Chronicles
Chapters 21:4-10
Amplified Bible
4But the king's word prevailed against Joab. So Joab departed and went throughout all Israel and came to Jerusalem.
5Joab gave the total number of the people to David. And all of Israel were 1,100,000 who drew the sword, and of Judah 470,000 who drew the sword.
6But Levi and Benjamin he did not include among them, for the king's order was detestable to Joab.
7And God was displeased with this [reliance on human resources], and He smote Israel.
8And David said to God, I have sinned greatly because I have done this thing. But now, I beseech You, take away the hateful wickedness of Your servant; for I have done very foolishly.
9And the Lord said to Gad, David's seer,
10Go and tell David, Thus says the Lord: I offer you three things; choose one of them, that I may do it to you.