This was Satan who moved David against Israel to number Israel and Judah (1 Chron. 21:1), but this was permitted by God.

This was Satan who moved David against Israel to number Israel and Judah (1 Chron. 21:1), but this was permitted by God.
cf. 2 Sam. 21:1
The threshing floor of Araunah (who is called Ornan in 1 Chron. 21:15-28) became the site where the temple of God was built (2 Chron. 3:1).
cf. 1 Kings 19:21