Initial port of counts-to-mass-number problem.  Not quite done yet.