David ordered Joab to take a census of Israel. 1 Chronicles 21:5 gives 1.1 million as the census results but 2 Samuel 24:9 says 1.3 million. Why the discrepancy
Ellicott's Commentary for English Readers
The numbers here differ greatly from those given in 1Chronicles 21:5-6; but there is no reason to suppose any corruption of the text in either case. Joab undertook the work unwillingly, and performed it imperfectly. According to 1Chronicles 21:6 he refused altogether to number Levi and Benjamin; and according to 1Chronicles 27:24 "he finished not," and no official record was made of the result; "neither was the number put in the account of the chronicles of king David." The numbers were, therefore, in part mere estimates.
Click the link above to see more if interested.