There's at least a couple of different ways she could have known about this.
The Doctor told her.
Why wouldn't he tell her? They must have spent a lot of time together prior to "The Husbands of River Song", including probably decades (in both of their timelines) of marriage. She even knows his real name. It makes sense that she'd know everything about him, especially non-minor details like how many lives he's got left. Don't forget that she certainly knows about Donna and seems to know what happened to her in the end, which was only shortly after the Meta-Crisis events:
DOCTOR: Donna! Quiet, I'm working.
RIVER: Donna. You're Donna. Donna Noble.
DONNA: Yeah. Why?
RIVER: I do know the Doctor, but in the future. His personal future.
DONNA: So why don't you know me? Where am I in the future?
-- S4E8, "Silence in the Library" (OK, it doesn't come out clearly in the dialogue, but just look at the expression on River's face during this exchange)
Even if he didn't tell her all the details of the Meta-Crisis Doctor - how he came to exist, what he did - he could at least have told her as much detail as he told Clara:
DOCTOR: No, not for ever. I can change twelve times. Thirteen versions of me. Thirteen silly Doctors.
CLARA: Okay, so you're number eleven, so ...
DOCTOR: Ha. Are we forgetting Captain Grumpy, eh? I didn't call myself the Doctor during the Time War, but it was still a regeneration.
CLARA: Okay, so you're number twelve.
DOCTOR: Well, number ten once regenerated and kept the same face. I had vanity issues at the time. Twelve regenerations, Clara. I can't ever do it again.
-- "The Time of the Doctor"
That's very important info for River and their relationship - if something happens to him, will he come back with a new face or not? - and he doesn't necessarily need to have told her any more than this.
She knows from his regeneration energy.
River has actually had a ridiculous amount of involvement with the Doctor's regeneration energy over the years:
- In "Let's Kill Hitler", she uses up all of her regenerations to heal him.
- In "The Wedding of River Song", she shoots him mid-regeneration and kills him.
- In "The Angels Take Manhattan", he uses spare regeneration energy to heal her hand.
Any of these interactions could have given her enough information about his regeneration energy to realise that he's on his last face and doesn't have enough energy left for another full regeneration. After all, she's a regenerator herself, even if not Gallifreyan; she has good reason to know this stuff.