2 Samuel 24:2-4
24:2 The king told Joab, the general in command of his army, “Go through all the tribes of Israel from Dan to Beer Sheba and muster the army, so I may know the size of the army.”
24:3 Joab replied to the king, “May the Lord your God make the army a hundred times larger right before the eyes of my lord the king! But why does my master the king want to do this?”
24:4 But the king’s edict stood, despite the objections of Joab and the leaders of the army. So Joab and the leaders of the army left the king’s presence in order to muster the Israelite army.