When you have a drink with an ice cube and twirl the glass, the liquid itself seems to twirl but the ice cube stays roughly in the same place. Why is this?
Your assertion that spinning the glass causes the liquid in it to also spin may contain only a grain of truth and a lot of optical illusion. It is extremely difficult to see the motion of water or even just the exact position of its surface; especially with calm water, this is a frequent cause of misjudged landings for pilots of sea or amphibious planes. What we do perceive is the shape, waves, and ripples of the surface of the water. These shapes tend to move very differently from the water that forms them, because water simply rising and falling may give the illusion of a wave moving forward (if water in front starts such motion at a slightly later time).
What likely happens is that a tiny amount of the spin you impart on the glass gets transferred to the water. Hence you see some indication of it rotating, which your brain may easily mistake for it rotating with the glass because it is so hard to tell (and what other likely speed is there for visual reference?). The ice cube, however, makes it obvious how slowly it is spinning. And it may very well spin at an even slower angular momentum because it, too, must first be accelerated by the limited amount of hydrodynamic friction.
May I propose an experiment where you sprinkle your water with small particles just big enough to be seen as individual markers? Perhaps some small bits of paper could do the trick. That should make it reasonably obvious how fast the water at the surface is spinning.
To get the ice cube to twirl by pure twirling of the glass, there need to be viscous stresses applied to the ice cube from the spinning water.
To simplify matters, lets say that the water in your glass is perfectly still before you start twirling, that the ice cube is away from the edge of the glass, and that the twirling is initiated smoothly so that there is no sloshing of the water in your glass. Now, as the glass begins to spin, it pulls on the water immediately adjacent to its boundary which will spin at the same rate as the glass without slipping (this is called a no-slip boundary condition). However, the glass cannot directly cause the water away from this boundary to move. Instead, viscous stresses have to transmit momentum from the boundary towards the centre but, as water is not very viscous, this takes time. In the (presumably) short amount of time you twirl your glass, there simply may not be enough time to get the ice cube to start spinning also.
However, if you really need to get your ice cube spinning or swirling around inside your glass in a hurry, creating a "slosh" wave is probably the best way to go about it.
If the liquid were really rotating in the glass, the ice cubes would rotate with it. What you are (probably) seeing is the superposition of two perpendicular resonant waves sloshing back and forth, but not rotating. Here is how it works:
Imagine that, instead of moving the glass in a circle, you just move it back and forth in an east/west direction. This would cause the liquid to slosh back and forth. Molecules near the edge would go up and down, but not move side-to-side very much. Any floating ice cube would also move up and down, but not move side-to-side much.
Now imagine that you move the glass back and forth in a north/south direction (instead of east/west as above). You will get a similar result as before, with the molecules (and any floating ice) mostly moving up and down, with only a little north/south motion.
Now imagine you do both at once. If you get the phasing right, the east/west wave will peak on the east side; then the north/south wave will peak on the north side; then the east/west wave will peak on the west side; and finally the north/south wave will peak on the south side. In other words, the "peak" will appear to rotate in a circle around the perimeter of the glass--but the molecules (and the floating ice) are still mostly moving up and down.
This is the same phenomenon that produces circular polarization in an electromagnetic wave.
When you stir the contents, everything in the cup gains angular velocity including the ice cubes. Centripetal acceleration causes less dense materials to accumulate at the center of rotation as the denser materials force their way to the edge of rotation. If the angular velocity is high enough, this edge can rise against gravity, causing the water surface to curve into a parabola. All of this is exploited in the laboratory equipment known as the centrifuge. Since ice is less dense than water it will tend to collect in the center of a stirred cup.
In short, the movement of an ice cube in water lags relative to the movement of the container because the ice cube's viscosity is sharply higher than that of the surrounding water. The effects of inertia might be more easily imagined by simplifying the components to a slowly-melting ice cube sitting on a smooth/flat platter. If the platter is slid briskly North for a distance for distance X, then the ice cube travels somewhat less than X. In both cases, the water acts a lubricant decoupling the motion of the container from the ice cube.
When you rotate a glass of water about its axis, only the water at the sides of the glass which is in direct contact with the glass rotates along with it initially, as water has a high force of adhesion with glass, which is stronger than the forces of cohesion between water molecules.
The rest of the water which is not in direct contact with the glass rotates with a far lesser angular velocity whose magnitude decreases as we move towards the centre of the water surface. At the very centre, the velocity is zero. This is similar to the fact that the "eye" of a hurricane is the safest place to be if you are caught in one!
The surface of the water aligns itself perpendicularly to the resultant acceleration vector so that the surface of the water tilts inwards towards the centre and hence an ice cube placed in a glass of water, on rotation of the glass, tends to move towards the centre of the glass where the angular velocity is almost zero (I am saying almost zero since the ice cube isn't a point mass. It covers some surface of the water so it may acquire a small angular velocity which is negligible at the beginning, but after some time becomes observable).
I must also add that the rotation of the ice cube becomes visible only after some time because the coefficient of friction between ice and water is very small, hence the angular acceleration is very small.
Let us make an mental experiment. Suppose that there is no friction between the glass and the water inside. In this case, if you rotate the glass, the water inside and the ice cube will just stay still. This is because the angular momentum of the water and of the ice cube is conserved, since in this case no torque is applied to the water, i.e., there is no force twirling the water and the ice cube. Without friction, twirling the glass has no effect on the ice cube, which stands still in its initial position.
The question at this point is why, if the angular (twirling) speed is high enough, the ice cube starts to move?
Suppose now that the water is frozen. In this case, the glass and the water is a rigid body, and therefore if you twirl the glass, you twirl the frozen water altogether.
If the water is not frozen and you take into account friction, you realize that the twirling glass and the friction between the glass and the water will result to a small applied torque to the water inside, and as a consequence to the ice cube (due to the friction between the ice cube and the water). Therefore the ice cube will start to twirl slowly. The angular momentum of the ice cube after a fixed time is roughly proportional to the friction between glass and water, water and ice cube, and to the angular momentum of the glass. Since the friction is indeed very small, if the "twirl" speed (angular momentum) is not fast enough, you are not able to appreciate any "twirling" of the ice cube.
Also if you rotate the glass back and forth, clockwise and anticlockwise repeatedly, the torque is applied each time in a different direction and for a very short time, and therefore the torque applied to the ice cube has literally no time to accelerate the ice cube.
If you make the glass rotating in the same direction for a time long enough, you will be able to see the ice cube twirl (this is in principle how centrifugal machines work).
The coefficient of friction between the glass and water is high enough so that by twirling your glass, the water gets dragged along and starts twirling too.
However, this seems not to be the case for the coefficient of friction between the water and the ice cube. Thus, the water cannot drag the icecube with itself (or cannot drag it aswell as the glass drags the water : maybe if you keep twirling long enough the ice cube will eventually start spinning too)