Count output was off by one.
Run permutation tests in chunks rather than one by one.