I enjoyed the A-story with Data as a fish out of water. It was reminiscent of his time in 1850's San Fransisco in "Time's Arrow", but this time we have the added problem of his memory loss.
As for the B-story, keep in mind that medical, scientific, and other similar specialists are almost always given a higher rank in military organizations. So Troi already had the rank of lieutenant commander due to her role as ship's counselor. Beyond that, all she really needed was a decent knowledge of ship's operations to become a full commander. And that's what we saw during this episode. If it helps, think of her as a lieutenant commander in terms of her specialty, and a lieutenant in terms of ship's operations. Combined, that's enough to make her a commander.