I'm pretty sure it's 2 boarding passes, and you won't get the miles for the 2nd segment.
Or put another way, let's say a flight operates EWR-ORD-SFO on the same flight number. I book EWR-ORD. There's no way I end up with EWR-SFO mileage, because I'm not on the 2nd flight.
If you don't board the 2nd flight, you won't be on it either... and no miles for that 2nd leg.