I think I understand what you are saying. You have three Tamagotchi, which have all connected with each other. Let's call these 3 Tamagotchi A, B and C. So A has connected with B and C, B has connected with A and C, and C has connected with A and B. So each Tamagotchi should have two friends. The glitch you are describing is where one of your Tamagotchi has three friends instead of two.
This doesn't sound like a major glitch, but are you sure that you haven't connected that Tamagotchi to another one? Like possibly a brothers/sisters/friends Tamagotchi? In that case it's not a glitch at all.