Computing the sum of weights across all logical models satisfying a formula, used for probabilistic inference.