But when David refused to change his mind, Joab and the army officers went out and started counting the people.