Gen 15:5-6, 8-10, 17-18 NASB95 - 5 And He took him outside and said, "Now look toward the heavens, and count the stars, if you are able to count them." And He said to him, "So shall your seed be." 6 Then he believed in the LORD; and He reckoned it to him as righteousness. ... 8 He said, "O Lord GOD, how may I know that I will possess it?" 9 So He said to him, "Bring Me a three year old heifer, and a three year old female goat, and a three year old ram, and a turtledove, and a young pigeon." 10 Then he brought all these to Him and cut them in two, and laid each half opposite the other; but he did not cut the birds. ... 17 It came about when the sun had set, that it was very dark, and behold, [there appeared] a smoking oven and a flaming torch which passed between these pieces. 18 On that day the LORD made a covenant with Abram, saying, "To your seed I have given this land, From the river of Egypt as far as the great river, the river Euphrates:
Gen 17:4-7 NASB95 - 4 "As for Me, behold, My covenant is with you, And you will be the father of a multitude of nations. 5 "No longer shall your name be called Abram, But your name shall be Abraham; For I have made you the father of a multitude of nations. 6 "I will make you exceedingly fruitful, and I will make nations of you, and kings will come forth from you. 7 "I will establish My covenant between Me and you and your descendants after you throughout their generations for an everlasting covenant, to be God to you and to your seed after you.
To reckon something to someone is a "credit" or a "promise" as Paul translates it in Romans 4.
Rom 4:9-11 NASB95 - 9 Is this blessing then on the circumcised, or on the uncircumcised also? For we say, "FAITH WAS CREDITED TO ABRAHAM AS RIGHTEOUSNESS." 10 How then was it credited? While he was circumcised, or uncircumcised? Not while circumcised, but while uncircumcised; 11 and he received the sign of circumcision, a seal of the righteousness of the faith which he had while uncircumcised, so that he might be the father of all who believe without being circumcised, that righteousness might be credited to them,
Eph 1:13-14 NASB95 - 13 In Him, you also, after listening to the message of truth, the gospel of your salvation having also believed, you were sealed in Him with the Holy Spirit of promise, 14 who is given as a pledge of our inheritance, with a view to the redemption of [God's own] possession, to the praise of His glory.
So how do we qualify as Abraham's descendants so we can inherit that promise of righteousness? by having the same faith in the gospel of Jesus Christ which Abraham had:
Gal 3:6-9, 16 NASB95 - 6 Even so Abraham BELIEVED GOD, AND IT WAS RECKONED TO HIM AS RIGHTEOUSNESS. 7 Therefore, be sure that it is those who are of faith who are sons of Abraham. 8 The Scripture, foreseeing that God would justify the Gentiles by faith, preached the gospel beforehand to Abraham, [saying,] "ALL THE NATIONS WILL BE BLESSED IN YOU." 9 So then those who are of faith are blessed with Abraham, the believer. ... 16 Now the promises were spoken to Abraham and to his seed. He does not say, "And to seeds," as [referring] to many, but [rather] to one, "AND TO YOUR SEED," that is, Christ.
Rom 4:12-13, 16-17 NASB95 - 12 and the father of circumcision to those who not only are of the circumcision, but who also follow in the steps of the faith of our father Abraham which he had while uncircumcised. 13 For the promise to Abraham or to his descendants that he would be heir of the world was not through the Law, but through the righteousness of faith. ... 16 For this reason [it is] by faith, in order that [it may be] in accordance with grace, so that the promise will be guaranteed to all the descendants, not only to those who are of the Law, but also to those who are of the faith of Abraham, who is the father of us all, 17 (as it is written, "A FATHER OF MANY NATIONS HAVE I MADE YOU") in the presence of Him whom he believed, [even] God, who gives life to the dead and calls into being that which does not exist.
We are co-heirs with Jesus by being adopted as Abraham's descendants. Being adopted as a descendant of Abraham is how we become "known" by God. God will tell those who do works in His name to depart, He never knew them.. but the adopted He knows.
Gal 4:5-9 NASB95 - 5 so that He might redeem those who were under the Law, that we might receive the adoption as sons. 6 Because you are sons, God has sent forth the Spirit of His Son into our hearts, crying, "Abba! Father!" 7 Therefore you are no longer a slave, but a son; and if a son, then an heir through God. 8 However at that time, when you did not know God, you were slaves to those which by nature are no gods. 9 But now that you have come to know God, or rather to be known by God, how is it that you turn back again to the weak and worthless elemental things, to which you desire to be enslaved all over again?
Rom 8:15-17 NASB95 - 15 For you have not received a spirit of slavery leading to fear again, but you have received a spirit of adoption as sons by which we cry out, "Abba! Father!" 16 The Spirit Himself testifies with our spirit that we are children of God, 17 and if children, heirs also, heirs of God and fellow heirs with Christ, if indeed we suffer with [Him] so that we may also be glorified with [Him.]