Texture2D has the mipmapCount field, but Cubemap and Texture3D (and possibly other Texture-based types) don’t. You can use GetPixels/SetPixels to access data for a particular mip level, but as far as I can see you have no way of determining how many there are.
Is this just an omission, or are there other ways of finding out the same information?