The number of 613 laws are counted so according to rabbinical counsel. You could number them yourself and come up with something completely different.
King David committed adultery, conspiracy, murder, lied, lusted, yet he lived and is called a righteous man, what saved him from death was his...