Add N Queens problem counting variant