Labour have won eight, having taken Merton and Wandsworth from the Conservatives, who have held five boroughs.
Barnet and Camden, Brent and Harrow, Enfield and Haringey, Greenwich and Lewisham, Lambeth and Southwark, City and East, Ealing and Hillingdon are also held by Labour.
The Conservatives have held Croydon and Sutton, Bexley and Bromley, Havering and Redbridge, South West, as well as West Central.
After 12 areas declared, 43% of voters for the London Assembly supported Labour, while 32% voted Conservatives.
So far, voter turnout is 45%, an increase of 7% on 2012.
Vote counting at Alexandra Palace, Excel and Olympia, is being done electronically.
London’s political editor Tim Donovan tweeted: “Looking like close to 80% of votes scanned and read. Khan ahead 44% – 35% on 1st preferences”.
The voter turnout at this election appears “higher” than in 2012, he added.
As the counting got under way, Mr Khan said “I am always nervous”.
“I am the least complacent person you will find but I also enjoy good weather, so I’m enjoying the good weather today,” he said.
“I loved the campaign. I have always enjoyed talking to Londoners and the last 24 hours have been fantastic.”
Voters were able to choose first and second preferences for mayor, and two types of London Assembly member – one for their area and one for the city.
Whoever becomes the new mayor holds the largest personal mandate for any political office in the UK. The victor will succeed Boris Johnson who defeated Ken Livingstone.\
The mayor has control over four major policy areas in London – transport, policing, environment, and housing and planning – and the London Assembly scrutinises the mayor’s policies.
The assembly must also be consulted over the Greater London Authority budget. It can reject mayoral policies or amend the draft budget if two-thirds of its members agree to do so.
Speaking in Sheffield, Labour leader Jeremy Corbyn said Tory candidate Mr Goldsmith’s had engaged in a “smear” campaign in trying to link Mr Khan to “extremists” and this had helped Labour.
“This vile campaign run by the Tories, the way they’ve tried to smear Sadiq Khan, the methods they’ve used and the language they’ve used, has had a very big effect in exactly the way they didn’t want.
“So many people are just revolted by what was said about Sadiq yesterday they came out and voted for us.”
His comments come after senior Conservative London politician Andrew Boff criticised the party’s mayoral campaign for seeking to link Mr Khan to “extremists”.
“I was supportive of the whole campaign apart from one element and that one was where it seemed to attribute radical tendencies to people of orthodox religious views.
“I think that is a complete misunderstanding of the patchwork of faiths there are in London, and has the potential to alienate people.”
Apology for Barnet voters
Meanwhile outgoing mayor Boris Johnson thanked the capital for his eight years in office, as he sent his final messages from the official London Mayor Twitter account.
He tweeted: “It’s time to sign off from City Hall – it’s been the most amazing privilege to be your mayor.”
Barnet Council apologised to voters on Thursday and an investigation has been launched after many people were turned away from polling stations in the borough because their names were missing from the poll list.
It confirmed all 155 polling stations had been affected but said staff had accurate registers by 10:30 BST.
Voters whose names were missing had been allowed to apply for an emergency proxy vote.