Implement function to determine how many cores are available.