"Behold, a people that dwells alone" (Numbers 23:9). When He gladdens them, no nation rejoices together with them; rather, all of them are smitten, [as it is said,] "The LORD alone did lead him, [and there was no foreign god with him]" (Deuteronomy 32:12). And when the nations rejoice in this world, they (Israel) eat together with every kingdom and rulership, and it does not go up against them from the reckoning, as it is said, "and shall not be reckoned among the nations" (Numbers 23:9).
Israel Dwells Alone and Is Not Reckoned Among the Nations
Midrash Tanchuma Buber, Balak 19:3
הן עם לבדד ישכון (במדבר כג ט). כשהוא משמחן אין אומה שמחה עמהן, אלא הכל לוקין [שנאמר] ה' בדד ינחנו [ואין עמו אל נכר] (דברים לב יב), וכשהאומות שמחין בעולם הזה, הם אוכלים עם כל מלכות ומלוכת, ואינן עולה להם מן החשבון, שנאמר ובגוים לא יתחשב (במדבר כג ט).