In A New Hope, the Rebels assault the Death Star with X-Wing fighters launched from a moon around the planet Yavin. However, the Death Star only sends out a few squadrons of of TIE Fighters to counter them. It did send out Darth Vader himself, along with a few elite pilots, but given that the Death Star is a massive space station, shouldn't it be able to send out TIE's by the hundreds (if not the thousands) and completely wipe out the opposition before any of them got a chance to line up a shot on that exhaust vent?
Having re-read the script, it seems that Tarkin and Vader didn't view the attack (by the fighters) as much more than an annoyance until it was far too late.
Resistance (by the Rebels, who're about to get their base destroyed) was always to be expected but since the Death Star's armour was considered impregnable to fighters and since the Imperials were expecting their turbo-lasers to deal with whatever resistance they encountered, they didn't send out any fighters until it became apparent that their lasers simply weren't getting the job done;
ASTRO-OFFICER : We count thirty Rebel ships, Lord Vader. But they're so small they're evading our turbo-lasers!
VADER : We'll have to destroy them ship to ship. Get the crews to their fighters.
The TIE-fighters were primarily tasked with stopping this small number of rebel fighters from inflicting surface damage to the station and to that end they only seem to have sent out a modest number of ships. By the time they'd spotted that there was a bigger problem, it was simply late to get more TIE-fighters into the fray. Less than three minutes elapsed between the Chief Officer telling Tarkin about the possibility of a successful attack and the point that the Death Star blew up.
OFFICER : We've analyzed their attack, sir, and there is a danger. Should I have your ship standing by?
TARKIN : Evacuate? In our moment of triumph? I think you overestimate their chances!
VOICE : Rebel base, three minutes and closing.
First off, a correction: the X-Wings were launched from Yavin's fourth moon's surface.
The main reason for this off the top of my head is that the X-Wings were only in two places- there a few in the trenches going for the exhaust port, and others covering them outside the trench. There was limited room to have lots of TIE fighters, so instead they sent a small number of elite pilots. They sent as many as were appropriate- any more and they would have gotten in each others' way. We see that they sent more than enough as it was as they managed to whittle down the number of attackers relatively quickly. The problem was that the rebels only needed one good shot from a single fighter.
As for the question of whether they had enough warning to destroy them before they got in range, I'm not sure there was. Looking at the script (available on IMDB) it doesn't show us whether they knew about the attack before the rebels started their attack run. What's certain is that the TIE fighters were only detected when they they'd already started their attack.
Another potential reason is that they may have believed it was only the first stage of an attack- they didn't think there was a threat, so they may have held back their forces believing there would be an attack from a capital ship.
Another answer lies with the extended universe. The book "Star Wars Death Star" covered the time between creation of the Death Star up till its destruction.
Disclaimer: It's been a year or so since I read the book, that's why I have not included any kind of quote but was more or less paraphrasing.
At some point in the book the station is attacked by a rebel fleet in Separatist ships, this is before the station is operational, less so than the 2nd death star in RotJ. Without question, orders are sent out to launch fighters to stop them, the rebels are easily destroyed, they don't even get in range of the turbo lasers.
Later on, during the events of the movie, the question arises whether they should send out fighters or not. One of the higher ups says no, we need to give the turbo laser operators some fun/practice and it wasn't fair that the fighters get all the fun. Then when they realize that the turbo lasers are crap against fighters it's too late.
The odds of getting a successful hit into the Thermal Exhaust Port were incredibly low. The first attempt failed, resulting in only damage to the surface of the exhaust port. This was attempted by an accomplished pilot with sophisticated targeting equipment. If it wasn't for the fact that Luke used The Force to help aim, it would have been very likely that the mission would have resulted in failure.
According to the Wookieepedia:
The port was only two meters wide, approximately the size of a womp rat, and lay at the end of a large trench in the hull of the battle station, and was ray shielded against energy weapons such as laser cannons.
Grand Moff Tarkin, who was the commander of The Death Star greatly underestimated the effectiveness of the attack from the rebellion, specifically from Luke. The Death Star was only seconds away from destroying Yavin, and the Rebel Base on it. He didn't think the threat warranted scrambling every single tie fighter to battle a handful of fighters. Especially, because the threat was so close to being neutralized. They most likely didn't even have enough time to respond. Vader, and other elite tie fighters were already working on destroying the rest of the rebel fighters, and would have succeeded if it wasn't for Han coming and saving the day in The Millennium Falcon.
As a sidebar: the game Star Wars: X-Wing for the PC had the Death Star mission, and it was one of the toughest missions in the game. If you missed the port, then you had to keep flying around the entire Death Star until you could get a direct hit. It took quite a long time to orbit it since it was humongous. It wasn't uncommon to take 3 or 4 passes before getting a lucky hit.
The possible scenario I see is this. The Death Star only sees a Rebel fleet as a threat, not fighters. This requires turbo-lasers, fighters would just get in the way (see my note about AA gunnery below). If the Rebels do use fighters, the Empire expects the slower, more heavily armed Y-Wings, but the Rebels have recently added the more nimble X-Wing which the Empire is not prepared for.
Since the Death Star was on the attack, a wise commander would have a heavy fighter screen already launched. But the Empire, thinking conventionally, was quite arrogant about their new station and the Rebel's ability to defeat it exemplified by Motti "any attack made by the Rebels against this station would be a useless gesture, no matter what technical data they've obtained" and Tarkin "Evacuate? In out moment of triumph? I think you overestimate their chances!" Surprise is expressed that the Rebels would even attempt to attack the station using starfighters. "We count thirty Rebel ships, Lord Vader. But they're so small they're evading our turbo-lasers!"
Even after the attack has begun, Tarkin does not recognize the danger and makes no move to change tactics. For much of the attack they have only their ineffective turbo-lasers to defend themselves. Well after the Rebel attack has begun it's Vader who gives the order to launch fighters, too late to get more than a handful of nearby fighters in the air.
Lucas was drawing from WWII. Here's a quick breakdown of how WWII air defenses would be laid out.
Combat Air Patrol [CAP] is a small number of fighters flying at all times. They search for enemies and can quickly respond to threats. It's a small number to allow craft to be rotated, refueled, maintained, pilots rested, and to have fighters available to escort a strike.
Fighters launched after enemy detection. This takes time. The pilots must be roused, briefed, suited up, and gotten to their craft. Armaments must be made ready. The fighters must be fueled (you don't leave fueled craft lying around, even in space, they are a fire hazard in case of damage). And then they have to wait in line according to the launch capacity. The Death Star is huge, and even if it can launch thousands of fighters at once they still have to fly to combat.
Anti-aircraft gunnery was wildly inaccurate and was mostly about throwing the largest amount of metal into the sky possible. Everything from .50 cal machine guns to 20mm and 40mm auto-cannons to 16 inch battleship guns would fire. It is shown in the Star Wars universe that gunnery is still done largely by eyeball. Defending pilots would avoid getting too close to their own AA guns in combat for fear of being shot down by their own people. This is why the guns stop in the trench run, they don't want to hit their own TIE fighters. Sending in fighters would mean stopping the turbo-laser fire.