And therefore it was imputed to him for righteousness.

So, this means that it was counted as if he had done everything right.

King James Version

Simple English

* Work in progress - there may be occasional inaccuracies