15:5

וַיּוֹצֵא אֹתוֹ הַחוּצָה וַיֹּאמֶר הַבֶּט־נָא הַשָּׁמַיְמָה וּסְפֹר הַכּוֹכָבִים אִם־תּוּכַל לִסְפֹּר אֹתָם וַיֹּאמֶר לוֹ כֹּה יִהְיֶה זַרְעֶךָ׃

And He brought him outside and said: "Look, please, toward the heavens and count the stars, if you are able to count them." And He said to him: "So shall your offspring be."

Bereshit 15:5

וַיּוֹצֵא אֹתוֹ הַחוּצָה

Bereshit / Genesis 15:5 · Drash

Bereshit 15:5

וַיּוֹצֵא אֹתוֹ הַחוּצָה וַיֹּאמֶר הַבֶּט־נָא הַשָּׁמַיְמָה וּסְפֹר הַכּוֹכָבִים אִם־תּוּכַל לִסְפֹּר אֹתָם וַיֹּאמֶר לוֹ כֹּה יִהְיֶה זַרְעֶךָ׃

And He brought him outside and said: "Look, please, toward the heavens and count the stars, if you are able to count them." And He said to him: "So shall your offspring be."

Drash דְּרָשׁ

Go out of your astrology

Avram saw in the stars that he would have no son. "And He brought him outside." The midrash reads: brought him out of the stars' power.

Rashi: according to the midrash, the Eternal said: go out of your astrology. By the constellations Avram has no son, but Avraham has. Sarai will not give birth, but Sarah will: I will give you another name, and the constellation will change. Another explanation: He raised him above the stars, so "look" means from above downward. Lekach Tov: there is no need to fear the signs of the heavens. Prayer, return and charity annul a harsh decree, and so do a change of name, of place and of deeds, and Avraham had all of these.

How Rashi and Midrash Lekach Tov explain it

Rashi And He brought him outside

By the plain sense, He brought him out of the tent, outside, to see the stars. And by the midrash, He said to him: go out of your astrology, by which you saw in the constellations that you are not destined to have a son. Avram has no son, but Avraham has a son. And likewise Sarai will not give birth, but Sarah will give birth. I will call you by another name, and the constellation will change. Another explanation: He brought him out of the space of the world and raised him above the stars, and this is the meaning of the word "look" (הַבֵּט), from above downward.

Midrash Lekach Tov And He said: look, please, toward the heavens

This is what the Holy One, blessed is He, commanded Israel in the days of Yirmeyahu: "thus says the Eternal: do not learn the way of the nations, and do not be dismayed at the signs of the heavens, for the nations are dismayed at them" (Yirmeyahu / Jeremiah 10:2). Avraham I have already taken out of this trait. Prayer, return (תְּשׁוּבָה) and charity (צְדָקָה) annul harsh decrees, as it is written: "and My people, over whom My name is called, will humble themselves and pray" (Divrei HaYamim II / II Chronicles 7:14): this is prayer. "And seek My face": this is charity, as it is written: "I in righteousness (בְּצֶדֶק) will behold Your face" (Tehillim / Psalms 17:15). "And turn from their evil ways": this is return, and then: "and I will forgive their sin".
Rabbi Chanina in the name of Rabbi Yosef says: also a change of name, and a change of place, and a change of deeds. A change of name, with Avraham: "and your name shall no longer be called Avram, but your name shall be Avraham" (17:5). A change of deeds, in Nineveh, as it is written: "and the Almighty saw their deeds, that they turned from their evil way, and the Almighty relented of the evil He had said He would do to them, and did not do it" (Yonah / Jonah 3:10). A change of place, as it is written: "go for yourself from your land", "and I will make you a great nation".

Takeaway

The Talmud tells: Avraham said "I looked at my constellation, and I am not destined to have a son", and the Eternal answered: "go out of your astrology, Israel has no constellation" (Shabbat 156a).
The same three things are named in the prayer of the Days of Awe: "but return, prayer and charity avert the harsh decree".
The Talmud lists what tears up a person's decree: charity, prayer, a change of name and a change of deeds, and some add a change of place (Rosh Hashanah 16b). Avraham had all of these: a new name (17:5) and a new land (12:1).