If all the flights have separate flight numbers, you will earn miles and status credits based on the distance for each flight. In terms of status credits, if you're in discount economy, you'll earn 80 each way (30 for SIN-NRT, 40 for NRT-JFK and 10 for JFK-BOS). Times two if in full fare economy, x 4 if in business.