Commenting on Rom 4:3 and the verb λογιζομαι, Joseph Fitzmyer wrote the following against the common Protestant reading that results in a “legal fiction”:
The vb. elogisthē, “was credited,” is a bookkeeping term figuratively applied to human conduct (Ps 106:31; 1 Macc 2:52; Phlm 18; similarly dialogizein, 2 Sam 19:20); it tranlates Hebrew hašab lĕ. It was thought that the good and evil deeds of human beings were recorded in ledgers (Esth 6:1; Dan 7:10; T. Benj. 11:4; 2 Apoc. Bar. 24:1; Jub. 30:17; Herm. Vis. 1.2.1). The pass. elogisthē is to be understood as a theological passive; Abraham’s faith was counted by God as uprightness, because God sees things as they are. Hence, this manifestation of Abraham’s faith was de se justifying. Cf. Jas 2:23. (Joseph F. Fitzmyer, Romans [AB37; Garden City, N.Y.: Doubleday, 1992], 373)
On Rom 4:5, Fitzmyer wrote:
But when one does not labor, yet puts faith in him who justifies the godless. Paul contrasts faith with wage-earning labor; justice rules the latter but not the former. The phrase epi ton dikaiounta ton asebē, lit. “in the one justifying the godless,” is derived from the OT itself (Exod 23:7; Isa 5:23). It does not become a theoretical expression of Abraham’s belief. Not does it mean that Abraham was himself asebēs, “ungodly,” before he put his faith in Yahweh, even though Jewish tradition considered Abraham a gēr, “stranger, sojourner, alien” (Gen 23:4), one called from paganism. For at the moment of Abraham’s putting his faith in Yahweh, he had already been called and was scarcely “godless.” The phrase is instead a generic Pauline description of God himself: one who justifies the godless, one who acquits the sinner. Thus for Paul, even Abraham was dependent on a God who “justifies the godless.” God not merely confirms the good that people may do, but takes the initiative to restore a world that cannot save itself, to bring the godless sinner into a right relation with himself. Cf. Gal 2:16 . . . his faith is credited as uprighteness. Paul thus sums up his basic thesis. He appeals to the example of Abraham who was upright in God’s sight neither through the law nor through circumcision. So Abraham became the marking point in human history; before him all humanity was an undifferentiated mass. After hum, human beings were divided into two groups: the circumcised, the people of God, and the uncircumcised, the godless and idolatrous pagans. (Ibid., 375)