There is only one other place in the Hebrew Bible where explicit righteousness is imputed by the Lord, and that is the story of Phineas, the grandson of Aaron the high priest. That is, the same Hebrew grammar and diction used for Abraham in Genesis was also used for Phineas in the Psalms:
Psalm 106:30-31 (NASB)
30 Then Phinehas stood up and interposed,
And so the plague was stayed.
31 And it was reckoned to him for righteousness,
To all generations forever.
What did Phineas do? He speared an Israelite and his Midianite consort while in flagrante delicto in the immediate vicinity of the Tabernacle of the Lord (cf. Nu 25:1-14). Since the same Hebrew grammar used for Abraham is now applied to Phineas, readers of the Hebrew Bible therefore understood righteousness not only to refer to belief in the Promised Seed but acts to defend the Promised Seed.
What are we talking about?
Please remember that what Abraham had believed from the Lord (in Gen 12:1-3 and then reiterated in Gen 15:1-5) was the promise of his seed that would eventually sprout abundantly in the verdant and fertile Promised Land. The seed was both collective (the people of Israel) and individual, since the possessive pronoun of the very last word in Gen 22:17 is masculine singular in form and gender, and therefore refers to a specific individual (Gal 3:16), who therefore was "THE" Promised Seed. So there was the collective and individual aspects of the concept "promised seed" in the Hebrew Bible.
Thus Phineas reacted to the disobedient Israelite because he was desecrating the promise of Abrahamic Covenant, which were also reflected as specific injunctions in the Mosaic Law concerning intermarriage with idolatrous people (Ex 34:15-16). In other words, this guy was copulating with an idolatrous Midianite woman, and since the disobedience took place in the immediate vicinity of the Tabernacle of the Lord, the sin occurred "with a high hand." The desecration of the promise of Promised Seed was blatant. Phineas responded accordingly, and righteousness was reckoned to him by the Lord.
Thus righteousness was both visible and invisible.
In the case of Abraham, the faith was invisible, which was eventually made visible (or "perfected") in his subsequent offering of Isaac according to James 2:21-22 and Hebrews 11:17. Phineas, because he embraced the Abrahamic Covenant of Promised Seed, had acted out his faith, and therefore the Lord reckoned righteousness to him. His faith was visible.
In other words, righteousness in the Hebrew Bible is related to faith in the promise of the Promised Seed. Thus, when this faith is "acted out" (as in the case of Abraham offering Isaac or Phineas spearing the disobedient couple) the result is imputed righteousness as well, because the behavior stems from faith and hope in the promise of Promised Seed.
Finally, and very importantly, the promise of the individual Promise Seed was passed to David in the David Covenant (2 Sam 7:10-17). That is, the Lord reiterated that the promised seed (people of Israel) would sprout in the Promised Land (2 Sam 7:10), and that "THE" Promised Seed (son of David) would rule on the throne of David "forever and forever" (2 Sam 7:12-13 and 2 Sam 7:16). David believed this promise of the collective and individual Promised Seed as evidenced by his response in the remainder of the chapter.
In other words, like Abraham, David received righteousness for believing the promise of the Lord regarding the Promised Seed (both collective and individual). We know this because immediately subsequent to this promise from the Lord he committed adultery and then murdered Uriah the Hittite. The Lord subsequently forgave his sin (notwithstanding the ramifications that followed) because David was righteous before the Lord due to his faith in the Promised Seed.
Romans 4:3-8 (NASB)
3 For what does the Scripture say? “Abraham believed God, and it was credited to him as righteousness.” 4 Now to the one who works, his wage is not credited as a favor, but as what is due. 5 But to the one who does not work, but believes in Him who justifies the ungodly, his faith is credited as righteousness, 6 just as David also speaks of the blessing on the man to whom God credits righteousness apart from works:
7 “Blessed are those whose lawless deeds have been forgiven,
And whose sins have been covered.
8 “Blessed is the man whose sin the Lord will not take into account.”
This passage is quoting Psalm 32, which is the penance Psalm for his adultery and murder. In other words, David did nothing to earn righteousness and forgiveness because righteousness and forgiveness come through faith alone. David therefore did not deserve to be forgiven, but was forgiven because of his faith in the Promised Seed.
In summary, salvation in the Hebrew Bible came through faith in the Promised Seed, or Abrahamic Covenant, which was reflected in the Law of Moses. According to Hebrews 11:29, the running summary of the visible acts of faith mentioned in Chapter 11 (of Hebrews) concerning various characters in the Hebrew Bible was contingent on their faith in the "promise." This promise of course was the Abrahamic Covenant concerning the Promised Seed in the Promised Land.