add initial counter encoding
Merge pull request #7 from PreetamJinka/encoding

Add initial counter encoding