Splines, lattice points, and arithmetic matroids