Genesis 15:5
4 But look, the Lord’s message came to him: “This man will not be your heir, but instead a son who comes from your own body will be your heir.” 5 The Lord took him outside and said, “Gaze into the sky and count the stars—if you are able to count them!” Then he said to him, “So will your descendants be.” 6 Abram believed the Lord, and the Lord credited it as righteousness to him.
Deuteronomy 28:62
61 Moreover, the Lord will bring upon you every kind of sickness and plague not mentioned in this scroll of commandments, until you have perished. 62 There will be very few of you left, though at one time you were as numerous as the stars in the sky, because you will have disobeyed the Lord your God. 63 This is what will happen: Just as the Lord delighted to do good for you and make you numerous, so he will also take delight in destroying and decimating you. You will be uprooted from the land you are about to possess.
Notes and References
"... Genesis associates the “seed” promise of Genesis 15:5 most immediately with the patriarch’s natural descendants, a select group of which would inherit the promised land (e.g. Genesis 28:13–14). Elsewhere, references to the “stars” and “dust” are similarly limited in focus to the promise of land and to the old covenant nation of Israel (Exodus 32:13; Deuteronomy 1:10; 10:22; Nehemiah 9:23)—the land that would be lost and the nation that would dwindle to a small remnant through the curse of exile (Deuteronomy 28:62; compare Isaiah 48:18–19). Furthermore, later Old Testament texts, especially from Esther and Ezra–Nehemiah, explicitly restrict “seed” language to biological lineage when associated with the old covenant age. Nevertheless, we will see that Genesis itself and several Old Testament prophetic texts anticipate the expansion of “the seed of Abraham” to include those redeemed from both ethnic Israel and the nations during the eschatological age of the Messiah ..."
Derouchie, Jason S. Counting Stars with Abraham and the Prophets: New Covenant Ecclesiology in OT Perspective (pp. 445-485) JETS 58/3, 2015