God gives the increase, stop counting.

The numbering was started by Joab, the son of Zeruiah, but he did not go on to the end; and because of it, wrath came on Israel and the number was not recorded in the history of King David.
1 Chronicles 27:24

1)2Sa 24:1 Again the wrath of the Lord was burning against Israel, and moving David against them, he said, Go, take the number of Israel and Judah.
2Sa 24:2 And the king said to Joab and the captains of the army, who were with him, Go now through all the tribes of Israel, from Dan as far as Beer-sheba, and have all the people numbered, so that I may be certain of the number of the people.
2Sa 24:3 And Joab said to the king, Whatever the number of the people, may the Lord make it a hundred times as much, and may the eyes of my lord the king see it: but why does my lord the king take pleasure in doing this thing?
2Sa 24:4 But the king’s order was stronger than Joab and the captains of the army. And Joab and the captains of the army went out from the king, to take the number of the children of Israel.

3)1Ch 21:1 Now Satan, designing evil against Israel, put into David’s mind the impulse to take the number of Israel.
1Ch 21:2 And David said to Joab and the captains of the people, Now let all Israel, from Beer-sheba to Dan, be numbered; and give me word so that I may be certain of their number.
1Ch 21:3 And Joab said, May the Lord make his people a hundred times more in number than they are; but, my lord king, are they not all my lord’s servants? why would my lord have this done? why will he become a cause of sin to Israel?
1Ch 21:4 But the king’s word was stronger than Joab’s. So Joab went out and went through all Israel and came to Jerusalem.

2)Jas 1:13 Let no man say when he is tested, I am tested by God; for it is not possible for God to be tested by evil, and he himself puts no man to such a test:
Jas 1:14 But every man is tested when he is turned out of the right way by the attraction of his desire.

   [ + ]

1.2Sa 24:1 Again the wrath of the Lord was burning against Israel, and moving David against them, he said, Go, take the number of Israel and Judah.
2Sa 24:2 And the king said to Joab and the captains of the army, who were with him, Go now through all the tribes of Israel, from Dan as far as Beer-sheba, and have all the people numbered, so that I may be certain of the number of the people.
2Sa 24:3 And Joab said to the king, Whatever the number of the people, may the Lord make it a hundred times as much, and may the eyes of my lord the king see it: but why does my lord the king take pleasure in doing this thing?
2Sa 24:4 But the king’s order was stronger than Joab and the captains of the army. And Joab and the captains of the army went out from the king, to take the number of the children of Israel.
2.Jas 1:13 Let no man say when he is tested, I am tested by God; for it is not possible for God to be tested by evil, and he himself puts no man to such a test:
Jas 1:14 But every man is tested when he is turned out of the right way by the attraction of his desire.
3.1Ch 21:1 Now Satan, designing evil against Israel, put into David’s mind the impulse to take the number of Israel.
1Ch 21:2 And David said to Joab and the captains of the people, Now let all Israel, from Beer-sheba to Dan, be numbered; and give me word so that I may be certain of their number.
1Ch 21:3 And Joab said, May the Lord make his people a hundred times more in number than they are; but, my lord king, are they not all my lord’s servants? why would my lord have this done? why will he become a cause of sin to Israel?
1Ch 21:4 But the king’s word was stronger than Joab’s. So Joab went out and went through all Israel and came to Jerusalem.

The sin of taking the number of the people of The Lord

Now Satan, designing evil against Israel, put into David’s mind the impulse to take the number of Israel.
1 Chronicles 21:1

Then David said to God, Great has been my sin in doing this; but now, be pleased to take away the sin of your servant, for I have done very foolishly.
1 Chronicles 21:8