How is pressure an intensive property?
If we split the container into two, isn't there effectively half the number of molecules striking the wall on each side so the pressure should also be halved? Shouldnt pressure be dependent on the number of molecules?
You are right that if we only halved the number of particles we would have a smaller pressure. But you have also halved the volume of the container. The fewer number of particles hits the walls more frequently due to the smaller volume. In other words, the number of particles goes down, but the number of collisions per particle goes up. The two effects cancel out, leading to the same pressure as before you put in the partition.
But If we split the container into two, isn't there effectively half the number of molecules striking the wall on each side so the pressure should also be halved? Shouldnt pressure be dependent on the number of molecules?
The pressure is not dependent on the number of molecules alone. You can simply examine the ideal gas law: $PV=nRT$. If the temperature is constant then reducing both $n$ and $V$ by half leaves pressure unchanged.
Yet another way to think of it: if we use instead of $V$ and $n$ the molar density $\rho_n = \frac{n}{V}$, we get
$$P = \rho_n RT$$
or at molecular level, the molecular density (also number density) $\rho_N = \frac{N}{V}$ giving
$$P = \rho_N k_B T$$
which shows that the pressure is an intensive property, since the volume ($V$) does not appear. This $\rho_n$ is itself an intensive property for the same reason ordinary mass density is an intensive property.
Thinking about this more physically, since pressure is force over area, and the force is proportional to the number of molecules hitting it which in turn is proportional to how many happen to be in proximity, then we can think about it like this: the amount of molecules that each tiny piece of surface area "sees" remains the same in each case despite that we have cut off another half of the box, and thus it feels the same force. Think about a box of (reasonably small) ordinary macroscopic balls - if I insert a (thin) partition halfway in between the balls while displacing as few as possible, does any little bit of the area of the box's surface suddenly have much more or much less crowding next to it than before? The same thing happens here.