Everything was correct, from a certain point of view
Now we know Jon's three lost brothers are Robb, Bran and Rickon.
Daenerys
Daenerys has likely heard of Robb's death in Season 3 Episode 9, "The Rains of Castamere", due to it being quite a talked about event. She had also heard of Bran and Rickon's "deaths" from Tyrion when Theon and Yara meet with them. From this conversation she also learns that the Stark boys aren't actually dead or weren't killed by Theon at the least.
Tyrion: It was. And how have things been going for you since then? Not so well, I gather. Can’t imagine you would have murdered the Stark boys if things had been going well.
Theon: I didn’t murder the Stark boys. But I did things that were just as bad or worse.
Yara: And he paid for them.
Tyrion: Doesn’t seem like it. He’s still alive. It was complicated for you, I’m sure, growing up at Winterfell. Never quite knowing who you were. But then, we all live complicated lives, don’t we?
Game of Thrones, Season 6 Episode 9, "Battle of the Bastards"
Again as the quote in the OP comes from after the Battle of the Bastards it is most likely she has since heard of Rickon's death. Therefore, from her poiint of view losing two brothers is correct.
Jon
Now I can spin this a few ways for it to make sense. Firstly, if you want to take the literal meaning of the word then Robb wasn't lost and Jon would have suspected that Theon didn't actually kill his brothers because of Rickon turning up. Therefore, the only two having their whereabouts unknown were Bran and Rickon.
If you want to take the implied meaning of the word, i.e. death, (which is most likely what Dany means here) then it can still ring true in Jon's head. At this point he knows for sure that Robb and Rickon are dead, however, he doesn't have any concreete evidence for Bran. As Theon's story of killing them is false we can assume that Jon doesn't really believe it.
So, what about Jon saying he thought he was dead? Well for starters it's a lot easier to admit something to yourself when you have hard evidence. It's likely Jon never wanted to actually admit most of his family were dead and so kept kidding himself. So, here again it would appear that Jon saying two brothers is also correct from a certain point of view.
Lastly, on Jon's part it's important to note he is there to ask for Daenery's help, she is having a private conversation with him and is starting to open up to him. The worst thing he should do is correct her and look like a smart arse in this situation if he believes she is wrong.
On a bit of a meta note for Jon's answer to the question here you say he nods but the transcript over on Genius seems to believe he shakes his head. Now I've watched the scene back and I think he does actually nods his head but it is only a slight nod. This could mean multiple things to slight agreement, hard for him to admit, etc.
Jon probably knew Theon didn't kill the boys
I'm not sure if there is any hard evidence for this one but Theon told Sansa about him not actually killing the boys and it was discussed later on. Therefore, it's highly likely Sansa told Jon about this but I can't remember if it happens on screen or not.
Theon: Jon will have me killed the moment I step through the gate.
Sansa: I won’t let him. I’ll tell him the truth about Bran and Rickon.
Theon: And the truth about the farm boys I killed in their place? The truth about Ser Rodrik, who I beheaded?
Game of Thrones, Season 6 Episode 2, "Home"
Jon knew Bran was alive anyway
Theon supposedly killed Bran and Rickon back in Season 2 Episode 8, "The Prince of Winterfell. Sam then meets Bran in Season 3 Episode 10, "Mhysa". Even though Bran makes Sam promise not to tell Jon about him going north of the Wall, Sam does tell him anyway.
Jon (to Sam): When you told me about Bran going beyond the Wall, all I could think about was getting my strength back so I could go and find him.
Game of Thrones, Season 4 Episode 4, "Oathkeeper"
Losing two doesn't mean you haven't lost three
Just because he hasn't opened up about the full extent of his "loss" doesn't mean he hasn't lost more. After all if you've lost 3 brothers and you say you've lost 2 that doesn't mean you haven't lost 3. It just means you are only telling part of the story.
Technically he has lost two siblings
This is a spoiler from Season 6 onwards and was explicitly confirmed in Season 7 Episode 7, "The Dragon and the Wolf". Of course Jon doesn't know about it at this point either so it could have been a hint by the writers to include the "2 brothers" thing.
Jon is actually the legitimate son of Rhaegar Targaryen and Lyanna Stark. This means he has lost two half siblings already: Rhaenys and Aegon.