Optionally outputs all counts and lengths to csv