Can someone please explain to me how the mechanical advantage in this pulley system is 8? I thought that the mechanical advantage was calculated by counting the number of strings attached to the weight, so shouldn't the MA be 4?
If you pull down on the free end with tension $T$, the each of the eight strings pulls up on the weight with tension $T$ and so the total lifting force is $F_L=8T$. Similarly when each of the 8 strings is shortened by a length $l$, the then you have $8l$ of extra string at the free end, so $F_E$ is lowered by $8l$. In each case the advantge comes out at $8$.
The arrangement shown in the picture is known as a snatch block. The mechanical advantage of a snatch block is equal to the number of supporting strands emanating from the moveable pulleys, which in your picture, are numbered "1" through "n". Since each moveable pulley has two supporting strands emanating from it, the mechanical advantage of the given system is 2n, not 8. This occurs because, assuming the same tension in each supporting strand, there are 2n tension forces pulling the load up. For more info, see https://en.wikipedia.org/wiki/Block_and_tackle
The number of strings attached to the weight is not a measure of MA. You could double up the strings and have eight strings attached to the weight without changing the MA. Or you could join strings and have only two or even one string attached to the weight - again, the MA would not change.
Go back to first principles and work out what force is exerted on the weight when a given force $F_E$ is applied to the left hand rope.