WASHINGTON—For decades, the task of counting the total number of federal criminal laws has bedeviled lawyers, academics and government officials.

"You will have died and resurrected three times," and still be trying to figure out the answer, said Ronald Gainer, a retired Justice Department official.

In 1982, while at the Justice...