When Abner returned to Hebron, Joab pretended he wanted to talk privately with him. So he took Abner into one of the small rooms that were part of the town gate and stabbed him in the stomach. Joab killed him because Abner had killed Joab's brother Asahel.
Joab the son of Zeruiah had begun to count the people, but he stopped when the LORD began punishing Israel. So the total number was never included in David's official records.