Add frame count to header.