This question already has an answer here:
I named my system "Foob" on my 2012 MacBook Pro. Yosemite has renamed it "Foob (4)". I wasn't sure where that "(4)" came from so I renamed it back to "Foob" in the Sharing Preferences. But, I looked today and it's now at "Foob (2)"
Why is it doing this? How can I stop it?