I'm usually a very dominant top lane as Olaf, but I faced a Riven and got rocked. I couldn't counterhit her or harass her, and stun would basically just give her a free harass. How should I go about laning against Riven as Olaf?
A well played Riven can beat almost anyone in lane, especially melee champs. That being said, to deal with her in lane as Olaf I would start Cloth Armor + 5 pots and then build into Ninja Tabi and Wriggle's Lantern. These items allow you to sustain her harass through both increased armor and lifesteal.
Trading with Riven is very difficult, as she can easily use her abilities to run away or harass depending on how you play. If you notice that she uses several of her abilities in quick succession, take advantage of her 6-7 seconds of cooldowns to try to get your true damage off as she attempts to CS. Otherwise, there is not much you can do to her. Be very careful when she is about to hit level 6, as many Rivens like to go all in right when they get their ult.
Olaf isn't the best choice for laning against Riven. She can close or create gaps quite quickly, and with her stun she can get in and out fast while dealing damage. Try to play safe against her, focusing more on your CS that trying to trade with her. If you can get some good axes off on her, that would slow her down.
As Olaf Riven has a couple advantages in the match up, her high mobility and lack of resource management. This match however is very winnable for Olaf. Buy building early hp in the form of Heart of Gold, Phage, Or Giants belt and continually spamming E onto Riven Olaf will continuously push her out of lane or even kill her. Although Olaf has less mobility then Riven he makes up the difference with his attack damage and life steal steroid used in conjunction with his short cool down true damage burst.
Olaf is Rivens #1 counter. Max Reckless Swing E first.