Use pwrite to write the number of sections.