Welcome to Flyertalk !
If it's really a continuation flight (seems to be the case), then you will unfortunately earn the miles only for the equivalent of a true non-stop flight NRT-PEK. And I doubt you'll succeed in trying to retroclaim for both segments, as :
- you will receive very likely a single BP for NRT-PEK
- and even if you have 2 BP, the attached ticket will be checked and FB people will see that you were booked on a "direct" flight NRT-PEK
The only way for you to know in advance is to check your booking or your e-ticket receipt. If it shows only one flight with origin = Tokyo and destination = Beijing, then it will be as I said above (1 BP, miles for the virtual single flight). In this case your booking should also shows something like : "stops : 1".
If it shows 2 flights (like for a classical connection), then you'll have 2 BP and should have the miles for each segment.
But, again, there are 95% chance that you are in the 1st case.