Think of the kings of Israel and contemplate their deeds: whoever among them feared Torah was delivered from troubles; and these were the seekers of Torah whose transgressions were forgiven. Think of David who was a man of righteous deeds and who was therefore delivered from many troubles and forgiven.
--4Q398 lines 24-25, a letter written within the Jewish community at Qumran, part of the Dead Sea Scrolls
Now to the one who works, his wages are not counted as a gift but as his due. And to the one who does not work but trusts him who justifies the ungodly, his faith is counted as righteousness, just as David also speaks of the blessing of the one to whom God counts righteousness apart from works: 'Blessed are those whose lawless deeds are forgiven, and whose sins are covered; blessed is the man against whom the Lord will not count his sin.'
--The Apostle Paul, Rom 4:4-8
Incidentally, in line 31 of this same fragment the writer of this Qumranite letter reflects on his readers' devotion to Torah and writes that "it will be counted to you for righteousness," using the very same three-word string that is found in the Hebrew of Gen 15:6, speaking of Abraham's being counted righteous apart from his deeds. (The only other place in the OT where the two words for "count/reckon" and "righteous" occur in tandem is Ps 106, speaking of Phinehas' righteous action.)
The Qumran community got a lot right. When you read the scrolls next to Jubilees or 2 Baruch or 4 Ezra or other Jewish intertestamental writings, you see that the Qumranites had a deeper grasp of mankind's depravity, the greatness of God's mercy, the beauties of obedience, and the sovereign rule of God.
But their gut instinct, and yours and mine, as to how God relates to his people, is: obey, and you will be counted righteous. Performance leads to an (earned) verdict.
Paul's post-Damascus gut instinct--the gospel--is: be counted righteous, and you will obey. A (free) verdict leads to performance.