This has been covered a couple times, lately, so I'm just going to quote
Bedelman's advice here:
Originally Posted by bedelman
Good reservations agents can book the two segments separately in some way, such that pax earn the total flown miles rather than the nonstop miles. I've had the EXP desk do this for me a couple times. They seem to completely understand why this matters to pax and why it's convenient, and those who know how to do it can do it in 20 seconds.
See
Miles for multiple segments with same flight number
Got XXX-YYY-ZZZ miles for single flight number XXX-ZZZ