As ChrichtonsGirl said, the number is the number of inches around the rib cage just under the breast.
The letter indicates the size of the breast itself.
So say a girl was 32inches around her ribs, and 37 around the thickest part of the chest.
The next girl is 36inches around her ribs and 41 around the thickest part of her chest.
Both girls have a 5 inch difference and thus are the same letter.
But the second girl would be a 36X, the first is only 32X (I don't know what letter a 5 inch difference is).
So yes the letter really indicates the size of the breast itself, but the number indicates how big her chest is.
So like just saying a B cup doesn't totally work...because she could have a 42 inch rib cage (body builders for example) and relatively smallish breasts.
Or she could have a 32inch rib cage and they would be proportionally alot bigger.