名(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,
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.’
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.