I am certain that if you bought ORD-NRT and NRT-SIN as separate segments (even though they both share the same flight number UA881), you will absolutely get mileage posted for each discrete segment.
This is almost always more than if you booked the through flight as one segment.