added get_bits_count()