Carbons have been numbered differently in two different pictures. What are the rules of carbon numbering?
Actually, the numbering is the same, at least for the fructose portion of the molecule (which is the right-hand monosaccharide in your sucrose image - the one on the left is glucose).
The key point in carbohydrate numbering is to look for the carbon which is an aldehyde or a ketone (the carbonyl carbon). This will be the end of the monosaccharide which is numbered lowest. For aldoses, this carbon would be carbon 1. For ketoses, it's the lowest number that can be reached in the linear, ring-open form (e.g. for fructose, it's 2). The rest of the carbons are numbered accordingly.
When you have a linear Fischer projection (like the "D-fructose (linear)" images on the second image) the carbonyl carbon should be obvious. In the ring form, it's less obvious.
Instead of looking for an aldehyde or a ketone in the cyclic form, you're looking for an acetal or hemiacetal. That is, you're looking for a carbon with multiple bonds to oxygens. In the first image, this is the carbon which is making the oxygen bridge between the two monomers (the one on the left of the furanose) - the oxygen of the bridge is one oxygen, and the oxygen of the furanose ring is the other. In the second picture, it's the carbon on the far right. You have the ring oxygen of the furanose, and then a free hydroxyl oxygen. Both of these carbons are numbered "2", and if you imagine rotating the furanose ring 180 degrees to flip over that acetal position, you'll see the other carbons match up as well.
(One thing that might be tripping you up is the directionality of the 1 carbon with respect to the 2 carbon. Keep in mind that the hemiacetal form can interconvert with the ring-open carbonyl form, and the "anomeric position" of the monosaccharide is free to invert in chirality - that is, it can readily flip between "up" and "down". It's only when it's in the bonded acetal form that it's locked into either the alpha or beta configuration.)