count decoding