How did Madara know that Sasuke is the last surviving Uchiha? SPOILER ALERT: If you haven't read Chapter 657 of the manga, read further at your own risk.

In Chapter 657, the reborn Uchiha Madara asks Sasuke to join his side, remarking that they are the last of the Uchiha. However, he died before the Uchiha clan massacre, and was reincarnated with Edo Tensei only during the fourth World War. He fought with the five Kages, and then headed to the battlefield where Obito was fighting Naruto's team. Obito didn't have a chance to tell him the story of what happened after his death. 

How come he knows that Sasuke is the last surviving Uchiha?
In pages 11, 12 and 13 of chapter 657, it is clear that Madara and Black Zetsu (Madara's will) are able to communicate with each other:  



Black Zetsu adds (in page 11) that both him and Madara were underestimated. And in the two pages that follow, he 'shows us' flashbacks in which him and Madara have been communicating during the war.  

Given this, I'd say it's safe to assume that Madara got the information from Black Zetsu:
Either because he told him everything directly; or Madara may have gotten the information 'instantly' as soon as he was revived, since Madara and Black Zetsu share a deeper bond, since the latter is the former's will.