If you've upgraded your Mac to OS X Yosemite you may have come across this bug. Effectively what happens is that your computers name, which is visible in networking, keeps getting changed. For example mine went from 'Mr Sphynx' to 'Mr Sphynx (2)', then 'Mr Sphynx (3)', etc.
Resetting the name in 'Preferences' - 'Sharing', doesn't fix this as it just starts renaming again.
After some searching I found this which seems to work. Open a shell and delete the following files from
This will wipe some other settings, but it's easy to put them back. So far, the problem has not come back.