Its usually a feel thing. When does the riff repeat? When does it go back to the I chord? There are no rules just play them when you think it fits.
but, I know you probably want a more precise answer so, usually every four bars is good as in basic music chord progressions will repeat. Also...