About 5 months.
So, there have been quite a few confusions about the actual length of Bane's occupation of Gotham and Bruce's time in the pit. So let's go through the movie step by step and summarize all the hints about the chronology in order to wipe out any unclarities:
Shortly after Bruce is thrown into the pit Bane starts carrying out his plan. When Bane and Pavel force the board members to hand over the reactor, Bane explicitly states that it will take about 5 months for the core to deteriorate (they don't tell this anyone else, though, especially not the government or the Gothamites, since the belief that it will just go over and regulate itself is the whole reason for the government's policy of appeasement and waiting):
Bane: Pull the core out of the reactor!
Dr. Pavel: No, you cannot! This is the only power source capable of sustaining it. If you move it, the core will decay in a matter of months.
Bane: Five by my calculations.
Furthermore, the 57 that many seem to remember is shown during Bane's speech in front of Blackgate Prison (which is some time after the takeover). However, it is not the number of days, but most probably the number of minutes, as can be deduced from the next number being the seconds because they count down right during this very scene.
There are further numbers above those 57:3X
, clearly recognizable as 03:14:22
.
The following might be a bit speculative: It is not entirely clear what those numbers mean, but they could stand for months, days and hours. So at this point we would have about ~3.5 months (or ~105 days) left. But we also have to consider that green/red circle which counts down along with the timer. If we assume (though, not know) it started at a full circle, it already has lost about 1 quarter and thus the timer would have started at ~4.66 months (~140 days), which fits to Bane's approximation (whenever that month was lost already, either before carrying out the plan or between the takeover and the Blackgate speech).
Next, after some scenes of Bruce slowly recovering his ability to stand again, we see scenes of Gotham already in winter, presumably after some time has passed (considering that football season is in autumn). After that we see Bruce again, training in his cell. When he watches the TV and before he makes his first climbing attempt, the TV news headline says (sorry, again no HD footage for you, but it's also in the script):
DAY 84 SIEGE OF GOTHAM
And this fits also with the next scene in Gotham: the arrival of the Spec-Ops team with the supply shipment. In this scene the trapped police force is mentioned and a rough estimate of 3 months of occupation is given (which might be rather approximate):
soldier: Men who haven't seen daylight in three months.
Blake: Police officers who haven't seen daylight in three months.
And in fact in the next scene Lucius Fox tells them pretty accurately there's only 23 days left:
Fox: As the device's fuel cells deteriorate it becomes increasingly unstable, to the point of detonation. [...] And it will go off in 23 days, regardless of Bane's revolution or what we or the outside world choose to do.
So this makes about 4 months, again fitting to our previous computations (including a bit of a lax estimate of 3 months and the approximate month we might have lost before all the takeover).
After Bruce sees the footage of the hanged Spec-Ops team he destroys the TV and makes his second failing attempt at climbing out, followed by the successful ropeless climb. The next thing we see is Comissioner Gordon talking about doing something against the bomb as the time closes:
Gordon: The bomb goes off tomorrow, we have about 18 hours to do something.
Which is shortly before he gets captured and the movie's showdown unfolds.
I tried to put all this information into a timeline diagram of all the major events since Bruce's capture (beware, not exactly on scale), which does not explain everything exactly but gives some reasonable understanding of how the various events are chronologically connected:
Though, in the movie the time between the reactor theft, the football game and the storm on Blackgate seems much more compressed (in the way it's staged and intercut), so that estimate of already ~1 month passed at the Blackgate speech might not be entirely accurate and the overall time span till the explosion might have been little more than 4 months. But seeing the rather approximate usage of the word "month", Nolan's penchant for cross-cutting between scenes for raising tension, and that not all chronological connections are entirely clear, at the bottom line Bane's 5 month estimate (at least 4 at minimum) still seems a sufficiently reliable source for the overall duration of Bruce's time in the pit.
The pit wasn't mentioned as Lazarus pit, was it?
As to this, no, it wasn't mentioned specifically, but you are certainly not the only one to draw that connection, especially since it didn't just have physical regenerative effects but even more so a mental one (putting Bruce in the position to finally "pick himself up" from the well he once fell into).