St. Paul teaches that the time between Adam and Moses was a unique dispensation.
Therefore as sin came into the world through one man and death through sin, and so death spread to all men because all men sinned – sin indeed was in the world before the law was given, but sin is not counted where there is no law. Yet death reigned from Adam to Moses, even over those whose sins were not like the transgression of Adam, who was a type of the one who was to come. (Rom 5:12-14).
Here is the line of thought, after Adam men were sinning and they died, but sin was not “counted” because the law had not been given. I think the reference to Moses in v. 14 reveals that “law” here means the Law of Moses. What is this supposed to mean?
If I may take a stab at it, St. Paul sees a connection to the probation and failure of Adam with the probation and failure of Israel at the time of Moses. In a sense, Israel recapitulates Adam’s failure. The High Priest, the priests, the Levites, and all the Israelites are New Adams. The Tabernacle/Temple is a New Eden. These New Adams fail and so God removes them from their New Eden by destroying the Temple in 586 B.C.
By sin “counting” or “not counting”, St. Paul refers to probationary periods where covenant fidelity fails. Adam’s sin “counted” because it brought sin and death into the world. Sin under the Law of Moses “counted” because it revealed Israel was unable to bring “light to the nations” and universal devotion to the God of Israel.
It is not that men between Adam and Moses were not guilty of their sins because they hadn’t heard of the Law of Moses. On the contrary, God judged men at the flood for their sins because of their guilt. No, men were culpable of their sins on account of natural law and their consciences bearing witness to that law (see Rom 1-3). Here, “sin counting” has to do with the possibility of universal redemption, or in the case of Adam and Israel, universal darkness.