This is the third in our series of papers relating gauge theoretic invariants of certain 4-manifolds with invariants of 3-manifolds derived from Rohlin's theorem. Such relations are well-known in dimension three, starting with Casson's integral lift of the Rohlin invariant of a homology sphere. We consider two invariants of a spin 4-manifold that has the integral homology of a 4-torus. The first is a degree zero Donaldson invariant, counting flat connections on a certain SO(3)-bundle. The second, which depends on the choice of a 1-dimensional cohomology class, is a combination of Rohlin invariants of a 3-manifold carrying the dual homology class. We prove that these invariants, suitably normalized, agree modulo 2, by showing that they coincide with the quadruple cup product of 1-dimensional cohomology classes.