The way I've been handling processor count thus far (cores really counts more toward Oracle installs) is to query the Win32_Processor Class and count unique SocketDesignation properties. This works...
Thought I'd add to this old post for anyone else that searches - XP SP3 contains the properties in WMI. Has anyone tested in the latest version of Windows...