First David sent Joab “and all Israel,” and “they destroyed the children of Ammon” and besieged the city of Rabbah.
And it came to pass, after the year was expired, at the time when kings go forth to battle, that David sent Joab, and his servants with him, and all Israel; and they destroyed the children of Ammon, and besieged Rabbah. 2 Samuel 11.1
Joab led forth the power of the army, and wasted the country of the children of Ammon, and came and besieged Rabbah. But David tarried at Jerusalem. And Joab smote Rabbah, and destroyed it. 1 Chronicles 20.1
Then he went to Rabbah and put a gold crown on his head that weighted 1 talent (about 30 kilograms).
David …went to Rabbah and … took their king's crown from off his head, the weight whereof was a talent of gold with the precious stones: and it was set on David's head. And he brought forth the spoil of the city in great abundance. 2 Samuel 12.30And finally he did this to “all the cities of the children of Ammon”:
He brought forth the people that were therein, and put them under saws, and under harrows of iron, and under axes of iron, and made them pass through the brick-kiln: and thus did he unto all the cities of the children of Ammon. 2 Samuel 12.31David’s treatment of the Ammonites is stated a bit more clearly in the 1 Chronicles version of this story.
He brought out the people that were in it, and cut them with saws, and with harrows of iron, and with axes. Even so dealt David with all the cities of the children of Ammon. 1 Chronicles 20.3Neither story says how many Ammonites were killed. I’ll guess 1000.
(We know that God approved of this killing because God approved of all of David’s killings, with the single exception of the matter of Uriah. See 1 Kings 15.5.)