  A nowhere-zero $k$-flow on a graph $\Gamma$ is a mapping from the edges of
$\Gamma$ to the set $\{\pm1, \pm2, ..., \pm(k-1)\} \subset \bbZ$ such that, in
any fixed orientation of $\Gamma$, at each node the sum of the labels over the
edges pointing towards the node equals the sum over the edges pointing away
from the node. We show that the existence of an \emph{integral flow polynomial}
that counts nowhere-zero $k$-flows on a graph, due to Kochol, is a consequence
of a general theory of inside-out polytopes. The same holds for flows on signed
graphs. We develop these theories, as well as the related counting theory of
nowhere-zero flows on a signed graph with values in an abelian group of odd
order. Our results are of two kinds: polynomiality or quasipolynomiality of the
flow counting functions, and reciprocity laws that interpret the evaluations of
the flow polynomials at negative integers in terms of the combinatorics of the
graph.
