I recently watched a movie and in the movie it stated that the helicopter could not fly to the top of mt.everest to rescue the person stuck on the top. So why can't helicopters fly at such high altitudes?
Don't believe everything you see in the movies. Doubly so if the movie originated in Hollywood.
The world altitude record for a helicopter is 40,814ft (12440m), some 11,000 feet (3353m) higher then Everest, set in 1972 Reference: Wikipedia
In 2005 Didier DelSalle famously touched down on the summit of Everest in an AS350 Squirrel Reference: Wikipedia. See below for a video.
Both feats involved specially prepared aircraft and highly experienced crew.
As has already been pointed out, a helicopter, just like any other aircraft, has a ceiling above which they cannot fly. Since it's clear that it is possible to fly helicopters to the required altitude in certain conditions, this is just a red herring.
The real reason helicopters don't routinely fly to those altitudes is that they're not designed to. As with everything in aviation, performance is a trade off between engineering, aerodynamics and commercial pressures.
There's a big market for helicopters that can fly up to, say, 12-15,000ft (3600-4500m). The market for helicopters capable of rescuing climbers from the top of Everest is, at best, limited, and the technical demands of building a craft routinely capable of such a flight will push the costs up dramatically.
In short, they don't because nobody will pay for it.
The helicopter flies as long as the blades produce lift. Now,the lift is proportional to the density at a particular altitude. However, as altitude increases, the density goes down.
Usually, the helicopter compensates for this by increasing the lift coefficient by increasing the blade pitch (as the blade rotational speed, and hence V is constant). However, at a certain altitude, the maximum lift coefficient of the blades is reached and no further increase in lift is possible.
Hence, the helicopter cannot fly beyond this altitude. This is the absolute ceiling of the helicopter.