I've heard this called end to end ticketing, but whatever it's called I've done it many times and always received mileage credit. I've even checked in for the second ticket's outbound flights at the airport of the first ticket's outbound, if the hours work OK.