NS cashed two top hearts and switched to spades. West won the ace, played a diamond to the ace and ruffed a diamond high, then drew trumps ending in dummy and led ♦K. At this point he looked as if he was about to claim and had a card detached from his hand. South showed him ♦Q, indicating that it was dropping, congratulated him, put his remaining unplayed cards face-down on the table and reached for his scorecard.
West faced the card he had detached from his hand without really looking at it, and turned to North to explain how he could take the rest of the tricks. He started confidently, saying he could discard his spade losers on the diamonds, then stopped, looking puzzled, and said "I think I've miscounted, I have to give you a spade." It was scored as one down.
The card he had detached from his hand had been ♣5 rather than a loser, so he ended up with one fewer winner in dummy than he had originally counted.
It is not clear to me that he was actually going to play ♣5 on ♦K had play continued, and it obviously wasn't his intention to make that play. He might have just been rearranging his cards in his hand to make a clear demonstration of a claim. He later admitted to me that he had been confused by South's actions.
How should this be adjudicated?