fix Counter.ship software implementation to exactly match semantics of FPGA