By a plea of guilty the defendant confesses the indictment to be wholly true as charged.29

But by pleading guilty the defendant does not admit that the facts stated in the indictment amount to an offense.30