Romans 5:12 - 13
NLT - 12 When Adam sinned, sin entered the world. Adam’s sin brought death, so death spread to everyone, for everyone sinned. 13 Yes, people sinned even before the law was given. But it was not counted as sin because there was not yet any law to break.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.
Because God is a longsuffering God, so He didn't count our sins before the giving of the Law. If God counted mankind's sin the first times we commit it, how can God call himself longsuffering? So there are explanations other than punishment of why God did some of the harsh things to men (which seems to be counting man's sins) (e.g. the great flood, the destruction of Sodom and Gomorrah) in the light of this scripture.
Before giving the law, God relates to people freely out of His characters (e.g. love, kind, longsuffering, meekness, merciful)
After the giving of the Law, God relates to us with the Law, if we choose to be under the Law instead of His grace and mercy.
Romans 5: 12 - 13 does not in fact say Adam's sin was not counted. It says sin is not counted where there is no law, but Adam's sin was counted because God had given him a law - the commandment not to eat the fruit of the tree of the knowledge of good and evil.