There are at least 40,000 different varieties of rice, and they are classified into three principal types according to the length of the grains. The length of the grains has a significant effect on the texture of the rice when it is cooked in water. Long-grain rice retains its firmness and elasticity, and the individual grains stay separate. Medium-grain varieties turn out softer and have a slight tendency to stick together. This is particularly characteristic of those special types that are used to make risotto. Short-grain rice becomes very soft and sticks together tightly, which is why it is used to make sushi, sticky rice, and rice pudding.