SQL Server 2000:
SQL Server 2005:
select cpu_count / hyperthread_ratio AS PhysicalCPUs from sys.dm_os_sys_info