Yes, that's correct. Just keep in mind that a whole note need not fit in a single measure. For example, in 6/8 time, a whole note gets eight beats, but each measure only has 6. Similarly, for 3/4 time, a whole note gets four beats, but each measure contains only three.
See also I don't understand the bottom number in a time signature, which explains the same concept in a different way.
There is also a concept of "irrational" time signatures, such as 4/3 or 6/10. The rule holds here as well. In 4/3, a whole tone would receive 3 beats, and a measure would contain four 1/3-beats. ("Irrational" in this sense is distinct from the mathematical idea of irrational numbers.)