Moved an atomic addition for stats outside of a tight loop.

Should reduce thread contention a bit.