Rollfilms are self-protecting due to consisting of two layers:
-) the photographic film proper
-) a opaque paper.

The paper is located behind the film, and both are wound together on the spool. As the paper is somewhat longer at both ends it will protect the film from exposure when wound on the spool.
Furthermore that paper has markings which can be seen through a red window at the back of the camera, to enable winding of the film the right distance for the next exposure.
By this one could refrain from adding a automated proper winding and a frame counter to the camera (though such features still are useful).