Solving Satisfiability Modulo Counting for Symbolic and Statistical AI Integration With Provable Guarantees