Should this return a boolean rather than a length? If it does, `count` could be adjusted as a consequence of the decode.