Why aren't planetary gears used to have a fan in front of the fan in a turbo fan engine. Would this not lower energy consumption etc?
The power to drive a fan through a gearbox is not beyond current technical capability. Pratt & Whitney have developed the geared turbofan, the PW1000G that first ran in 2008 and entered commercial use in 2016, flying on 4 different aircraft, including the Airbus A320neo. This enables the fan to spin at a slower speed than the low pressure turbine, such that the turbine spins at a higher speed that is more efficient for power extraction from the relatively high velocity mass flow, while the fan spins at a lower speed that avoids the blade tips lossing efficiency or creating noise at take-off, due to near sonic flow.
The engine design involves trade-offs. The complexity and weight of a counter rotating two stage fan needs to be balanced against the achievable pressure ratio with a single stage fan, and the added benefit a two stage fan would provide. Some design work has considered counter rotating compressors for example, this thesis. or even earlier work in 1992. The gas turbine industry can be quite conservative - it costs huge amounts of money, and time, to develop a new engine design, and radical steps are much less common than evolution. Pratt took a gamble, that appears to have paid off, though they do still have some issues. However, it took them decades, and around $10 billion. Rolls Royce are considering a similar design (the UltraFan), but GE are more wary. They have chosen the use of new materials as they felt the addition of the extra component would add reliability, weight, and durability challenges that they could avoid by using material improvements instead. For example, the use of ceramic matrix composites in the hot section of the CFM56 LEAP. They claim this gives 15% fuel savings, but has taken 25 years to develop. In comparison, P&W claim the GTF is 16% more fuel efficent than current generation engines. So each manufacturer choses the route they are comfortable in, and may get to the same end point.
In general, the desire has been to increase by-pass ratio, as this lowers specific fuel consumption. However, increasing BPR results in larger diameter fans, and higher tip speeds, approaching sonic velocity if the turbine is run at the optimum rpm. Hence, the geared fan approach. Clearly, Pratt & Whitney did the trade-off analysis, and decided this was the best approach for a geared fan, balancing techncial risk, reliability, performance, in-service cost, and weight.
The power needed to drive a large fan is currently beyond of what is technically possible in gearbox engineering. The swirl losses of a single-stage fan can be somewhat recouped by inclining the struts holding the fan fairing, so a contra-rotating fan is not much of a help, but a tremendous engineering challenge.
EDIT: Clarification: Small geared fans do exist for a few decades already (Lycoming ALF502) and the maximum size of geared fans is increasing, but the size of the biggest engines is still far out of reach of today's technical possibilities. The biggest geared fan today has ⅓ of the thrust of large turbofans.
There is a reason why one might think counter-rotating fans could reduce energy consumption: any propeller or fan causes the air to move, besides the desired axial direction, also to some degree in a circular swirl manner. This is wasted energy.
There are different ways to reduce this loss. The simplest is to increase the diameter and decrease the blade angle of attack. But increasing the diameter can't be done without limits, and low AOA requires the blade tips to move faster – possibly supersonic, which creates its own problems. For this reasons, most big turboprops have relatively small, many-blade, relatively high AOA props – although that's not optimal swirl- and bladetip-vortex wise.
The most extreme approach is counter-rotation. A second coaxial propeller can cancel out the swirl, without increasing the diameter at all. So this is in particular useful for very large turboprop planes, the Tupolev TU-95 being the prime example. This plane still had supersonic prop-tips.
In a turbofan, the swirl is actually even more of an issue, because you have small diameter, lots of blades with a high angle of attack (and also high camber). But turbofans don't actively cancel that swirl, instead they use it passively to gain extra thrust. That does in fact not require contra-rotation, but only stator vanes. What these do is, they redirect the swirling motion backwards. That still recovers much of the energy loss from swirl, while being much less complex than gearing for counter-rotation would be.