Move count code into codonpdx module