How common is the phrase “同乡”?
同乡 is common in formal language. In spoken language, 老乡 is the preferred word especially in Northern China and it is an informal word. People from Southern China may choose 乡亲 or 乡里. (Reference on this regional difference: wikipedia)

Colloquial:


  On the airplane I met someone who came from the same hometown. 在飞机上我遇见一个老乡/乡里/乡亲。


Formal:


  There is a Shanxi Townsmen Association in Beijing. 在北京有个山西同乡会。


Because it's the name of an association, which should be formal, 同乡 is used.