In this paper we study how the number of nonnegative integer solutions of s integer linear equations in n > s unknowns varies as a function of the inhomogeneous terms. Aside from deriving various recurrence relations for this function, we establish some of its detailed structural properties. In particular, we show that on certain subsets of lattice points it is a polynomial. The univariate case (s = 1) yields E. T. Bell’s description of Sylvester’s denumerants. Our approach to this problem relies upon the use of polyhedral splines. As an example of this method we obtain results of R. Stanley on the problem of counting the number of magic squares. © 1988 American Mathematical Society.