Five quests from each of the Holds before you can advance the quest line, if I remember correctly. Or maybe it was five in a city and then a special quest in that city.
Yeah, it's 5 for each of the four Holds: Haafingar, The Reach, Whiterun, and Eastmarch.
You can quit any job without penalty, so just keep accepting/quitting until you get the Hold you need.
Than after those 5, each Hold will have one unique quest to do. You can see details on them http://www.uesp.net/wiki/Skyrim:Under_New_Management#Improving_the_Thieves_Guild but Delvin and Vex should prompt you to do them when you finish the 5th for each Hold.
If you don't want your journal cluttered up with a bunch of failed quests, quicksave right before talking to Delvin or Vex for jobs. Reload the save until you get a job in the hold where you need it.
Also, if you have Dragonborn installed the Radiant system can send you to Raven Rock to complete some of these jobs. The Bedlam Job from Delvin is bugged for Raven Rock due to a faulty script and cannot be completed.
This. I can't say how many times I reloaded because of being sent to Whiterun when I already had completed it.
I don't think this happens until you've gone to Solstheim at least once.
To really return it to its former glory, you need to get the safe. It's just not the Thieve's Guild without a safe.
I'm pretty sure I got sent to Raven Rock a few times before I visited Solstheim the last time I did the TG quests. I reloaded for other jobs because I didn't want to go there.
That's too bad. I haven't had any Raven Rock on my current character at 75 jobs done, so I suppose I'm lucky.
I know I had not been to Solstheim once with a character who took the job for the khajiit Kharjo to get his moon amulet. He sent her to a shack outside of Raven Rock.
I've had Sorine Jurard send me there to get crossbow upgrade schematics.
See the link in my signature. That's how you do it, haha!