In the beginning of Psalm 32 David says how great it is to be someone who's sin is never counted against them:
1Blessed is the one whose transgressions are forgiven, whose sins are covered. 2Blessed is the one whose sin the Lord does not count against them and in whose spirit is no deceit.
Paul quotes this and says this is true of the all saints, OT and NT:
NIV Romans 4: 1What then shall we say that Abraham, our forefather according to the flesh, discovered in this matter? 2If, in fact, Abraham was justified by works, he had something to boast about—but not before God. 3What does Scripture say? “Abraham believed God, and it was credited to him as righteousness.” 4Now to the one who works, wages are not credited as a gift but as an obligation. 5However, to the one who does not work but trusts God who justifies the ungodly, their faith is credited as righteousness. 6David says the same thing when he speaks of the blessedness of the one to whom God credits righteousness apart from works: 7“Blessed are those whose transgressions are forgiven, whose sins are covered. 8Blessed is the one whose sin the Lord will never count against them.” 9Is this blessedness only for the circumcised, or also for the uncircumcised? We have been saying that Abraham’s faith was credited to him as righteousness.
But Psalm 32 seems to proceed in a way that suggests that God does indeed count/reckon sin against the believer until they confess it and forsake it:
NIV Psalm 32: 3When I kept silent, my bones wasted away through my groaning all day long. 4For day and night your hand was heavy on me; my strength was sapped as in the heat of summer.b 5Then I acknowledged my sin to you and did not cover up my iniquity. I said, “I will confess my transgressions to the Lord.” And you forgave the guilt of my sin.
So does God count sins against a believer or not?