ctlz implementation for all bit widths

Reused counting one logic from CtPop