Numerous problems in program analysis can be reduced to finding bounds on the number of integer points in a convex set, or the solution of a more general polyhedral counting problem. For a large class of applications the solution of such a counting problem can be expressed as a piecewise Ehrhart quasi-polynomial in the parameters.