While preparing to build the temple, Solomon took a census of all of the aliens that were in Israel to determine how much of a labor force was available. The account of this is found in 2 Chronicles 2:17-18 and 2 Samuel 24.
2 Chronicles 2:17 And Solomon numbered all the strangers that were in the land of Israel, after the account that David his father had taken of them, and there were found a hundred and fifty-three thousand six hundred. 18 And he set seventy thousand of them to be bearers of burdens, and eighty thousand to be stone-masons in the mountains, and three thousand six hundred overseers to set the people to work. (Darby) (Emphasis added)
This account mentions that Solomon took the census in the manner of his father David. The only mention of David taking a census was when he numbered the fighting men and this event was not one of David’s better moments as king. In fact, he should not have taken a census at all. It seems that Solomon counted the foreigners and perhaps not the Hebrews, but the only record of David taking a census was the one noted in scripture and it clearly indicates that Joab counted the foreigners (2 Samuel 24:7 below). It is not necessarily evil to take a census and God had the Israelites do so before (Numbers chapters 1-4 and chapter 26). Nevertheless, God did not tell David to take a census and this story appears in 1 Chronicles 21 and 2 Samuel 24.
1 Chronicles 21:1 And Satan stood up against Israel, and moved David to number Israel. 2 And David said to Joab and to the princes of the people, Go, number Israel from Beer-sheba even to Dan; and bring the number of them to me, that I may know it. 3 And Joab said, the Lord add to his people, how many soever they be, a hundredfold: are they not all, my lord O king, my lord's servants? why does my lord require this thing? why should he become a trespass to Israel? 4 But the king's word prevailed against Joab; and Joab departed, and went through all Israel, and came [again] to Jerusalem. 5 And Joab gave the sum of the number of the people to David. And all they of Israel were eleven hundred thousand men that drew sword; and of Judah, four hundred and seventy thousand men that drew sword. 6 But Levi and Benjamin he did not count among them; for the king's word was abominable to Joab. 7 And God was displeased on account of this thing, and he smote Israel. 8 And David said to God, I have sinned greatly, in that I have done this thing; and now, I beseech thee, put away the iniquity of thy servant; for I have done very foolishly. (Darby) (Emphasis added)
The Plague of Ashdod.
Nicolas Poussin, 1630.
(The picture above depicts a different plague.)
God gave King David three options of punishment for counting Israel.
David Enrolls the Fighting Men
2 Samuel 24 Again the anger of the Lord burned against Israel, and he incited David against them, saying, “Go and take a census of Israel and Judah.” 2 So the king said to Joab and the army commanders[a] with him, “Go throughout the tribes of Israel from Dan to Beersheba and enroll the fighting men, so that I may know how many there are.” 3 But Joab replied to the king, “May the Lord your God multiply the troops a hundred times over, and may the eyes of my lord the king see it. But why does my lord the king want to do such a thing?” 4 The king’s word, however, overruled Joab and the army commanders; so they left the presence of the king to enroll the fighting men of Israel. 5 After crossing the Jordan, they camped near Aroer, south of the town in the gorge, and then went through Gad and on to Jazer. 6 They went to Gilead and the region of Tahtim Hodshi, and on to Dan Jaan and around toward Sidon. 7 Then they went toward the fortress of Tyre and all the towns of the Hivites and Canaanites. Finally, they went on to Beersheba in the Negev of Judah. 8 After they had gone through the entire land, they came back to Jerusalem at the end of nine months and twenty days. 9 Joab reported the number of the fighting men to the king: In Israel there were eight hundred thousand able-bodied men who could handle a sword, and in Judah five hundred thousand. 10 David was conscience-stricken after he had counted the fighting men, and he said to the Lord, “I have sinned greatly in what I have done. Now, Lord, I beg you, take away the guilt of your servant. I have done a very foolish thing.” 11 Before David got up the next morning, the word of the Lord had come to Gad the prophet, David’s seer: 12 “Go and tell David, ‘This is what the Lord says: I am giving you three options. Choose one of them for me to carry out against you.’” 13 So Gad went to David and said to him, “Shall there come on you three[b] years of famine in your land? Or three months of fleeing from your enemies while they pursue you? Or three days of plague in your land? Now then, think it over and decide how I should answer the one who sent me.” 14 David said to Gad, “I am in deep distress. Let us fall into the hands of the Lord, for his mercy is great; but do not let me fall into human hands.” 15 So the Lord sent a plague on Israel from that morning until the end of the time designated, and seventy thousand of the people from Dan to Beersheba died. 16 When the angel stretched out his hand to destroy Jerusalem, the Lord relented concerning the disaster and said to the angel who was afflicting the people, “Enough! Withdraw your hand.” The angel of the Lord was then at the threshing floor of Araunah the Jebusite. 17 When David saw the angel who was striking down the people, he said to the Lord, “I have sinned; I, the shepherd,[c] have done wrong. These are but sheep. What have they done? Let your hand fall on me and my family.”
David Builds an Altar
18 On that day Gad went to David and said to him, “Go up and build an altar to the Lord on the threshing floor of Araunah the Jebusite.” 19 So David went up, as the Lord had commanded through Gad. (NIV) (Emphasis added)
While the judgment was culminating, King David sought to make atonement at the threshing floor of Ornan the Jebusite because the angel of the L-rd stopped there. David bought the threshing floor from Ornan, and later Solomon built his temple there.
1 Chronicles 21:18 Then the angel of the Lord commanded Gad to say to David, that David should go up, and rear an altar unto the Lord in the threshing-floor of Ornan the Jebusite. (JPS)
1 Chronicles 21:28 At that time, when David saw that the Lord had answered him in the threshing-floor of Ornan the Jebusite, then he sacrificed there. (JPS)
It is strange that God says nothing about this other than that it is recorded in the narrative nor is there any apparent judgment due to this incident. When this is compared to what happened to David when he got out of line and nearly everyone else, this is really strange. Most of the events from King Solomon’s time share this exact same characteristic, that there is no judgment or reproof for things that would cause nearly anyone else mentioned in scripture to have a really bad time. There are very few instances of God reproving Solomon. The verbal warnings about some other things are stern rebukes, but there is very little of the tumult that King David, Saul, or nearly anyone else experienced. This is not an accident, as we shall discover.