Jane is on a diet. Bob hasn't seen her in 2.months. When he does he says, "wow you look great how much weight have you lost"
Nope. Bob gave a compliment and asked a question in regards to the compliment. It's not his business but Jane can tell him that if she's uncomfortable with the question. Most people who work hard on some thing are eager for people to notice.
Stop after "you look great." If other brings up why/how weight was lost then it would be appropriate to pursue particulars of the change.
"Wow you look great" is sufficient.
Compliment the weight loss and leave it at that.
I think it's different with a male bringing up weight to a woman. I think it's best left alone.
Unless Bob is her husband, father or brother...
I think Bob started off well with the compliment, but should've stopped before asking Jane how much weight she'd lost.
He darn well better notice!