I recommend one riff every 8-10 seconds, on average. Granted, if it the movie/short is VERY talky, you might need to alter that some, since it is best to pick your spots with narrators and the like who never shut up.
And if there is a lot of action going on at a certain moment (MITCHELL!!-like), then it does not hurt to stuff a bunch of them into a very short time span. Ala the "BIFF's" and "POW's" from a Batman episode.
And yes, I generally recommend that if you are starting out with riffing, start with a short. There are an endless supply of them out there on Archive.org and YouTube to get the ball rolling. Consider it training camp before the season starts.