名(míng) and 位(wèi) are both measure words. 名(míng) is used to modify the identity of people while 位(wèi) is frequently used in official occasions to express the respect and politeness. For example,

1)这所大学有三百名教授，五千名学生

Zhèsuǒ dàxué yǒu sānbǎimíng jiàoshòu， wǔqiānmíng xuéshēng

This university has three hundred professors five thousand students

‘This university owns three hundred professors and five thousand students.’

2) 本次会议有10位嘉宾出席

Běncì huìyì yǒu 10wèi jiābīn chūxí

This conference has 10 guests present

‘There are ten guests present in the conference.’

彭小川，李守纪，王红. 对外汉语教学语法释疑201例. 北京：商务印书馆，2004.