Fix a bug in range count in Bit library