Statistical mechanics of DNA topoisomers