"Abraham is already a follower of God, someone who already has faith in him, and the context stresses Abraham’s good works and righteousness: (1) He defeated the evil kings. (2) He rescued Lot and the other captives. (3) He went to a priest of God and gave thanks for the victory. (4) He refused any reward from the wicked king of Sodom. (5) And so God himself promised to give Abraham a reward instead. (6) The fact that God is rewarding Abraham for what he has done shows this isn’t a case of a sinner coming to God and repenting so he can obtain forgiveness. It’s God rewarding a follower for faithful service. That means Abraham isn’t acquiring righteousness here for the first time. He is already righteous, as his actions have shown. Then Abraham believes the incredible promise that he will have a multitude of descendants, despite his age (cf. Rom. 4:19, Heb. 11:12), and God reckons that act of belief as a new act of righteousness on Abraham’s part."
None of the above comments really address the text of Genesis 15:6 on its own terms. The "it" is a reference to Abraham's faith. His faith is the basis for receiving righteousness. That belief does not preclude the obedience of Abraham. His trust in God and His promises was the instrumental cause of him being counted righteous, not any good works that he did.
There are translational differences. Many readings are legitimate. However, it is important to note that the addition of the word "act" is not present in the vast majority of translations. Moreover, it is absent from the Hebrew. The Hebrew word in Genesis 15:6 is "tsedaqah," which refers to justice or righteousness. It denotes a state of being righteous or just. It is referring to what something is. The New English Translation has this footnote on Genesis 15:6:
"tn The sentence begins with vav (ו) plus a perfect verb. It does not show simple sequence, which would have been indicated with a vav plus preterite as in the surrounding clauses. The nuance may be that Abram had already come to believe or did so while God was speaking. For a detailed discussion of the vav plus perfect construction in Hebrew narrative, see R. Longacre, “Weqatal Forms in Biblical Hebrew Prose: A Discourse-modular Approach,” Biblical Hebrew and Discourse Linguistics, 50-98. The verb אָמַן (ʾaman) occurs with a Niphal and Hiphil opposition. In the Niphal it means “to be faithful, reliable, firm, enduring.” While in the Hiphil, the form used here, it means “to consider or treat something as reliable, or dependable.” Abram regarded God as reliable for this promise; he believed."