"Deliver me from bloodguilt, O God, God of my salvation; my tongue shall sing aloud of Your righteousness" (Psalms 51:16). Deliver me from the blood of Uriah, and so forth — a halakhah [follows]. Because of this, "Again the anger of the LORD was kindled against Israel, and He incited David against them, saying, Go, number Israel" (2 Samuel 24:1). "And He said to the angel that destroyed the people: It is enough," and so forth (ibid. 24:16). Rabbi Shmuel bar Nachman said: He hinted to the king that death rules over him, as you say, "And Joab said to the king: May the LORD your God add to the people, however many they are, a hundred times over" (ibid. 24:3) — a hundred [becomes] two hundred, two hundred [becomes] four hundred. Rabbi Levi said: Within twelve months Joab's blessings came [to pass]. Rabbi Eliezer ben Yaakov said: Moses's blessings have no limit — "May the LORD, the God of your fathers, add to you a thousand times as many as you are, and bless you as He has promised you" (Deuteronomy 1:11).
David's Bloodguilt and Joab's Hundredfold Blessing on Israel
Midrash Shmuel 30:1
הצילני מדמים אלהים אלהי תשועתי תרנן לשוני צדקתיך (תהלים נ"א ט"ז) הצילני מדמו של אוריה וכו' הלכה, מתוך כך (ויחל) [ויסף] אף ה' לחרות בישראל ויסת את דוד לך מנה את ישראל (שמואל ב' כ"ד א') ויאמר למלאך המשחית בעם רב וגו' (שם שם ט"ז), אמר רבי שמואל בר נחמן רמזו המלך שהמות שולט בו, כמה דאת אמר ויאמר יואב אל המלך ויוסף ה' אלהיך (על) [אל] העם כהם וכהם מאה פעמים (שם שם ג') מאה מאתים מאתים ארבע מאות, אמר רבי לוי בתוך שנים עשר [חדש] באו ברכותיו של יואב, אמר רבי אליעזר בן יעקב ברכותיו של משה אין להם קצבה, ה' אלהי אבותיכם יוסף עליכם ככם אלף פעמים ויברך אתכם כאשר דבר לכם (דברים א' י"א).