A lot of the time when a Pathfinder does that, it's the starter relay or solenoid wire, not the charging system. If the starter's solenoid doesn't energize via the ignition switch and starter relay, the starter doesn't work. Check for poor or loose connections at the starter and the relay under the hood. Try tapping the relay next time it doesn't start. If it works directly after that, it probably needs to be replaced.