We show that the Hilbert polynomial of a Calabi-Yau hypersurface Z in a smooth toric variety M associated to a convex polytope I^ is given by a lattice point count in the polytope boundary ∂I^, just as the Hilbert polynomial of M is known to be given by a lattice point count in the convex polytope I^. Our main tool is a computation of the Euler class in K-theory of the normal line bundle to the hypersurface Z, in terms of the Euler classes of the divisors corresponding to the facets of the moment polytope. We observe a remarkable parallel between our expression for the Euler class and the inclusion-exclusion principle in combinatorics. To obtain our result we combine these facts with the known relation between lattice point counts in the facets of I^ and the Hilbert polynomials of the smooth toric varieties corresponding to these facets.