fqe.bitstring.count_bits_above

Return the number of set bits higher than the position

string (int) - bit string

pos (int) - position in the bit string