The colors which are perceived by people are defined by the degree to which the light will excite the red,green, and blue photoreceptors in the cone cells of the eye. There are only three discrete colors we can perceive, and they are red, green, and blue. The statistics of the relative and absolute excitations, the amount of red,green, and blue averaged over many cells and over many time steps, defines the perceptual color space. It is somewhat vague, because the longer you average, and the more cells you have to average over, the finer you can distinguish the colors. But the gradiations become pointless after a certain amount of refinement.
The wavelengths of light are not in any way primary, the response of the three photoreceptors is. The reason different wavelengths have different colors is because they excite the different receptors differently.
This means that there is a three dimensional subspace of colors, which is defined by the degree to which the brain can integrate the signal for red,green, and blue, and determine the intensity of each component. The only way to be sure of the number of gradations of each is to do psychological testing: look at a division of the intensity scale for a pure color (a color which excites only one of the photoreceptors) and see how close the intensity can be before neighboring intensities cannot be reliably distinguished. It is probably between 255 and 512 steps for red and green in the standard range of a monitor, and between 100 and 256 for blue (this is a guess based on my own memories of my own perception). This is in the standard "octave" of a computer screen (the screen is not close to blinding, nor is it ever barely visible, but the eye is logarithmic, so this range should be the same in the total number of octaves, at most 10, I'll say about 4, and more for red/green then for blue, so that the right estimate is about 1000^3, or a billion colors.
But this does not take rhodopsin response into account. The rhodopsin response is separate from the color response, because the rhodopsin range is overlapping with all three receptors. If you include rhodopsin as separate, you would have to multiply by another 1000 possible values, or a trillion colors. Some of these colors would only be accessible by artificial means--- you would have to stimulate rhodopsin without stimulating the red, green, or blue phosphors, and this might be possible chemically, like if you have taken a psychoactive drugs, dream states, oxygen deprivation. Another way might be to use afterimages, which will remove the sensitivity of certain receptors.