is the magnetic field produced inside the soft iron core aligned with
the magnetic field produced in the primary coil, or does it oppose it?
A conductive (iron) transformer core has both diamagnetic (excludes magnetic field) and ferromagnetic (enforces magnetic field) properties.
For a microsecond or ten after the primary current is established,
the B field in the core is low, because eddy currents in the iron oppose the applied H
field. After 1000 microseconds, those eddy currents have died
out, and the iron magnetization reinforces the magnetic induction
provided by the primary winding.
$$B \simeq \mu * H$$
Many thin laminations, rather than a solid iron block, makes a
core that magnetizes more quickly (and helps energy efficiency),
because it minimizes that changeover time. Lenz's law applies
both to the eddy currents, and to the secondary currents, but does
not relate directly to "the" magnetic field. The B field comes from the
sum of those currents and the iron magnetic polarization, and isn't a simple superposition of parts,
because magnetization of iron is not linear. That constant "mu"
in the equation is ... not exactly a constant.
My text book says that 'when the secondary current is on, the magnetic
field it creates is in the opposite direction to the magnetic field of
the primary current.
There is some truth in that statement, because secondary current has
the effect of reducing the magnetization of the iron, and at low
magnetization, the system IS linear. Still, 'the magnetic field'
ought to mean the B field, inside the core, and not some theoretical
H field due to part of the nearby currents. That B field is
composed of induction by two (or more) transformer windings, and by
eddy currents, and by the ferromagnetic polarization.
While you can add the H field sources, it is not valid (because of
polarization) to confuse that sum with the B field in the core. The
polarization is not linear, and that fact will cause nonideal
behavior of the transformer, which should NOT be ignored.
A significant source of power loss in a transformer is the induced eddy currents in the core. Just as the varying magnetic field induces current in the secondary coil, it can also induce currents in the core itself. These currents do nothing but dissipate energy, and so are to be avoided.
To reduce eddy currents, you either build your transformer out of a non-conductive magnetic material (e.g. ferrite), or you split the core's conductive material into many plates separated by insulating layers. The insulating layers block the large-scale eddy currents while passing the magnetic field, thus reducing the power loss.
Best Answer
One or the main reasons for so many turns is to keep the winding current (and resulting energy loss) low.
Assuming a very low winding resistance, the no-load current flowing in the primary winding depends almost entirely on the applied voltage and the reactance of the winding ($I= \frac V{X_L}$). This current is 90 degrees out of phase with the applied voltage, so is not in itself drawing energy from the source, but does cause $I^2R$ loss in the winding.
The reactance ($X_L$) of the primary winding depends on it's inductance and the frequency of the applied voltage $(X_L = 2\pi fL)$ .
The inductance (all other things staying the same) is proportional to $N^2$ ($L=µN^2A/l$), where N = the number of turns, so as you reduce the number of turns the inductance drops exponentially (and the current therefore rises exponentially).
If the frequency is relatively low (e.g. 50 or 60 Hz) then the inductance must be kept high in order to keep the current from being too large (unless voltage is quite low). Higher current results in more heating ($I^2R$ loss ) in the winding, and the transformer then runs hotter. Thicker wire would help to minimise this but the heating is proportional to $I^2$ and inversely proportional to R so it is better to use more turns of thinner wire (higher R) than to run the circuit at higher current (much higher $I^2$).
e.g. halving the number of turns would result in $\frac 1 2$ of the winding resistance and $\frac 1 4$ of the winding inductance (= $\frac 1 4$ of the reactance). If the resistance is much less than the reactance then there will be close to 4 times the winding current. This will result in 8 times the $I^2R$ loss in the winding (assuming the same size wire).
Higher power transformers tend to have fewer turns (and thicker wire), to keep the winding resistance down, but are wound on larger cores (larger cross-sectional area, A, in the inductance formula above) to keep the inductance up.
At higher frequencies fewer turns and smaller lighter cores can be used, as seen in switch mode power supplies which typically operate at many kilohertz. These would rapidly overheat and burn out at 50Hz.