  In this paper, we address the problem of counting integer points in a
rational polytope described by $P(y) = \{ x \in \mathbb{R}^m \colon Ax = y, x
\geq 0\}$, where $A$ is an $n \times m$ integer matrix and $y$ is an
$n$-dimensional integer vector. We study the Z-transformation approach
initiated by Brion-Vergne, Beck, and Lasserre-Zeron from the numerical analysis
point of view, and obtain a new algorithm on this problem: If $A$ is
nonnegative, then the number of integer points in $P(y)$ can be computed in
$O(\mathrm{poly} (n,m, \|y\|_\infty) (\|y\|_\infty + 1)^n)$ time and
$O(\mathrm{poly} (n,m, \|y\|_\infty))$ space.This improves, in terms of space
complexity, a naive DP algorithm with $O((\|y\|_\infty + 1)^n)$-size DP table.
Our result is based on the standard error analysis to the numerical contour
integration for the inverse Z-transform, and establish a new type of an
inclusion-exclusion formula for integer points in $P(y)$. We apply our result
to hypergraph $b$-matching, and obtain a $O(\mathrm{poly}( n,m,\|b\|_\infty)
(\|b\|_\infty +1)^{(1-1/k)n})$ time algorithm for counting $b$-matchings in a
$k$-partite hypergraph with $n$ vertices and $m$ hyperedges. This result is
viewed as a $b$-matching generalization of the classical result by Ryser for
$k=2$ and its multipartite extension by Bj{\"o}rklund-Husfeldt.
