I noticed that 67P completes an orbit in 6.4 years. Assuming everything goes to plan, how long can Philae stay operational and keep sending data throughout the comet's orbit?
Philae can last many years (it's meant to survive perihelion pass, it has solar batteries, and it can withstand the long deep-space hibernation (it did it once already). Theoretically it could last as long as Opportunity on Mars.
Unfortunately it doesn't have antennas to reach Earth - only Rosetta. It depends on Rosetta to forward data back to Earth. As long as Rosetta is in orbit, and there's enough sunlight for the batteries, Philae can work. Unfortunately P67/Churyumov–Gerasimenko is as irregular and far from sphere as they get, so Rosetta can't attain a fully stable orbit without periodic corrections using its engines - and its fuel. This is the exhaustible resource that puts an upper limit on duration of the mission.
Since the arrival didn't entirely go without a hitch...
Reaction control system problems
In 2006, Rosetta suffered a leak in its reaction control system (RCS). The system, which consists of 24 bipropellant 10-newton thrusters, is responsible for fine tuning the trajectory of Rosetta throughout its journey. The RCS will operate at a lower pressure than designed due to the leak. This may cause the propellants to mix incompletely and so burn 'dirtier' and less efficiently, though ESA engineers are confident that they have sufficient fuel reserves to allow successful completion of the mission.
it's unlikely the reserves will last long beyond the planned end of the mission.
The Wikipedia page for Philae suggest a 1-6 week mission duration.
However, the design goal is always conservative. Consider the Mars rovers (Spirit and Opportunity) whose mission design goal was 92 days and Opportunity is at 3945 days now and going strong.
They design longer, but ensure the minimum.
So how long could it last? No one specifically knows, and possibly only time will tell.
News on the landing site suggests that they only have 60 hours of power in the battery and that the solar arrays are shaded and only get sunlight for 1 to 1.5 hours a day, which may not be enough to charge the battery. This poor location will likely reduced the life of the probe severely. However, they also are contemplating extreme notions such as using an extensible sensor to try and flip away to a better location.
While nothing is certain, even if there are no equipment failures it's unlikely that Philae would survive the comet becoming highly active as it approaches perihelion in fall 2015.
EDIT: Seems I was wrong. Quote from Dr Ulamec, lander team manager: "Risk of the lander being blown off the surface by strong cometary jets is low - it has too high a density"
In addition to what has been stated in other answers, it seems "if everything goes according to plan" is quite a bold assumption as there is serious concern that the lander may be stuck in the shade and/or wedged in a hole. In that case, battery life is about 60 hours before the lander must rely on solar power.
This means that with bad luck, it might all be over in a little over two days.
As has been said, only time will tell for certain.