It's the rating system MAC uses for standard liquid and cream foundation. The higher the number, the darker the pigmentation.
C, NC, N, NW and W are various degrees of warmth - C is pink-based, N is neutral and W is yellow-based. Other foundations in the line use a slightly different numbering code, but it's easy to calculate the approximate standard colour number.
As for finding out what colour number you are, swing by a MAC counter and get colour matched! Otherwise you can list your foundation shade in a standard line (the L'Oreal True Match foundations are a good set of standard colours) and the various MAC mavens on Specktra can hazard a reasonably accurate guess at your colour number.