When scripture says, "his faith is counted for righteousness" in Romans 4:5, it is important to recognize that it is not "his faith" itself that is righteous. The Greek preposition eis (unto, into, to, for) in Romans 4:5 can indicate that "his faith" is counted with a view to righteousness. For example in Romans 10:10, we have a very similar construction translated as "believes unto righteousness" (pisteuetai eis dikaiosynen). Based on this, I suggest that Romans 4:5 should be translated as "his faith is counted unto righteousness."
Now, some scholars will say that "counted for/unto righteousness" (logizomai eis dikaiosynen) can function like "counted as righteousness" (logizomai hos dikaiosynen), and this is true, but the context determines how these words should be interpreted. The immediate context of Romans 4:5 and the Apostle Paul's overall theology are sufficient to show us that eis should be interpreted as "unto." For example, Romans 4:4 shows how the reward is not intrinsic to the wage-earner but counted/imputed to him from outside of him. In Romans 4:6, the noun righteousness serves as the direct object of the verb count/impute. This indicates that it's not faith, but righteousness itself that is being counted/imputed.
In light of the above, let's examine Romans 4:6 a little more. It begins with the Greek conjunction kathaper (just as) to signify that it provides a supplemental description of the type of person just described in Romans 4:5. Now, in Romans 4:6, Paul says that "God counts (imputes) righteousness apart from works." It is important to see that if "his faith" itself is righteousness, then there would be no need to "count (impute) righteousness," since faith would inherently possess its own righteousness. Justifying faith is understanding and assenting to a justifying proposition. Abraham understood and assented to the promise of God and thereby became a partaker of the righteousness therein. In other words, he had the righteousness of the promise imputed to him. And this interpretation is consistent with Paul's overall theology. In particular, in Romans 4:5 and Romans 5:6-10, we learn that God justifies the ungodly person as an ungodly person. If "his faith" were an act of righteousness in itself or the basis of righteousness, then he could not be justified as an ungodly person.
To clarify what I said above about the context determining how we should interpret "counted for/unto" (logizomai eis) expressions, let's take a look at some other uses this construction. One passage is Romans 2:25-26. In those verses we read the following: "25 For circumcision verily profiteth, if thou keep the law: but if thou be a breaker of the law, thy circumcision is made uncircumcision. 26 Therefore if the uncircumcision keep the righteousness of the law, shall not his uncircumcision be counted for circumcision? What we see here is circumcision becoming (ginomai) uncircumcision on account of the person breaking the law. In contrast, we see uncircumcision counted for (logizomai eis) circumcision on account of the person keeping the law. So, we see that something can be figuratively "turned into" or "regarded as" something else on account of some cause. As another example, let's look at Psalm 106:30-31. There we read, "30 Then stood up Phinehas, and executed judgment: And so the plague was stayed. 31 And that was counted unto him for righteousness unto all generations for evermore." Here we see Phinehas being credited with righteousness in the sense of him receiving a reward of perpetual priesthood (Numbers 25:7-13) on account of his righteous act. It would be a tautology to say that his righteous act itself was righteousness. Rather, his righteous act was in view of him receiving a reward that represented righteousness. So, we see that the context determines how we should interpret "counted for" (logizomai eis). In Romans 4:5 we read, "But to him that worketh not, but believeth on him that justifieth the ungodly, his faith is counted for righteousness." In this case, we see an ungodly person who doesn't work being credited with righteousness when he assents to the truthfulness of the One who justifies the ungodly. Since it is an ungodly person who doesn't work it would be unreasonable to say that his faith itself was righteousness. He obviously has no righteousness of his own. By believing the truth, righteousness took hold of him, or in other words, "his faith was counted unto righteousness."
In light of the above considerations, I believe that "his faith is counted unto righteousness" should be the preferred translation of Romans 4:5. It is more consistent with the context and the overall tenor of Paul's teaching on justification.