Fix #353 and Fix #56.  Add support for omap and fix mappings with
counts.