Occasionally, your computer may show up on the network with a "(2)" or other number in parentheses after its name. In some cases, it will appear this way in the sidebar of your computer's Finder, but in other cases, only other computers are able to see the computer name with the (2).
Apple discussion user "jackeatley" writes:
"Does anyone have any idea why my imac has suddenly decided to call its self James Keatleys Imac (2), I don't own another imac and I haven't reinstalled either OS so I really don't understand..."
This occurrence basically it means your computer has been recognized twice on the network, and since network names must be unique, the system will automatically assign a sequential number to the computer name to make it unique.
There are several factors that can cause this, including conflicting network protocols, running virtual machines on your system, and even basic name duplication, which can happen for a variety of reasons.
1. Reset file sharing services.
A common reason for duplicate names on the network is having multiple file-sharing protocols enabled on your computer at once. Sometimes the computer will send a name broadcast for one protocol and pick up that broadcast with another protocol, resulting in your Mac seeing itself on the network. This usually happens when you have Windows-networking enabled, but can also happen if other sharing protocols, such as Bluetooth, are enabled.
You will not usually need to turn off your networking services, but toggling them off and on should clear this problem. Go to the "Sharing" system preferences and uncheck "Bluetooth" sharing. Then highlight "File Sharing" and click the options button. Uncheck all three protocol options (AFP, FTP, and SMB), and then close the window and uncheck "File Sharing." After this is done, ensure both the computer name and the local network/bonjour name is as you want it (without any numbers), and then enable the services again by checking them (ensuring the desired filesharing protocols are enabled).
2. Restart virtual machines.
Sometimes the computer will recognize a virtual machine (Parallels or VMware) as being a separate computer on the network. You may be able to clear this problem by restarting the virtual machine, though this problem may be related to bugs in the VM software that will need to be addressed by the developer.
3. Manually change the name.
In instances where you have just migrated to a new computer, depending on how you copied your data over, sometimes the computer name can be set erroneously as the same name as the old computer. In these cases, you should be able to manually change the computer name in the "Sharing" system preferences. Be sure that when you change the computer name the local name also gets changed. If it doesn't, manually change it using the "Edit..." button.Resources