Based on this article , I would suggest that you can use System.Management, as suggested above. Using the Win32_DiskPartition key, you can count the number of partitions returned. Sort of
ManagementObjectSearcher mos = new ManagementObjectSearcher("select * from " + "Win32_DiskPartition");
ManagementObjectCollection moc = mos.Get();
MessageBox.Show("Number of partitions" + moc.Count);
source
share