Model Counting for Sum of Conjunctive Formulas
When $C = 0$ and each $f_i$ depends on two inputs, your problem is equivalent to #2-MONOTONE-SAT, which is #P-complete, see for example this question on cstheory.