A constraint satisfaction problem, or CSP, can be reformulated as an integer linear programming problem. The reformulated problem can be solved via polynomial multiplication. If the CSP has n variables whose domain size is m, and if the equivalent programming problem involves M equations, then the number of solutions can be determined in time O(nm2M−n ). This surprising link between search problems and algebraic techniques allows us to show improved bounds for several constraint satisfaction problems, including new simply exponential bounds for determining the number of solutions to the n-queens problem. We also address the problem of minimizing M for a particular CSP.