Lux beats ahri in lane. Because of her ranged advantage. If you shoot your e whenever her Q is on CD, you have almost 100% chance to hit it, and it does good damage and slows her so you can follow up with Q if possible.
Post 6, Ahri beats Lux pretty badly. If you don't have a lead, Ahri can beat you pretty easily. She can ult to dodge your e while simultaneously gap-closing to land a charm in to her full combo, all while your biggest damage is on CD. She can also use the second ult charge to dodge your Q. With W and Barrier her all in might not kill you, but it should at least force you out of lane (and if she's ahead at all it'll kill you with ignite). She's also got better gank assist (since her ult can hard engage) and better gank escape (she's much more mobile with her R).
So basically, yes Lux counters Ahri pre-6. Post 6 I'd say it's in Ahri's favor, although not as much as pre-6 was in Lux's favor. If Lux can get some good ult roam kills she'll do well. If Ahri does so she'll do well. Overall I'd call it a skill matchup.
Lux outscales ahri against a squishy teamcomp (the every 20sec ult wrecks). Against a teamcomp with a front line Ahri is highly preferably (better dive potential, better disengage, better pick potential, etc...).
Just my biased opinion (I play ahri, not lux).