We played this at work with pennies back in the 1980's the loser had to buy for everyone at the snack cart. We called it spoofing
Wikipedia confirms this:
Spoof is a strategy game, typically played as a gambling game, often in bars and pubs where the loser buys the other participants a round of drinks. The exact origin of the game is unknown, but one scholarly paper addressed it, and more general n-coin games, in 1959. It is an example of a zero-sum game. The version with three coins is sometimes known under the name Three Coin.
Here's the description of Game play:
Spoof is played by any number of players in a series of rounds. In each round the objective is to guess the aggregate number of coins held in concealment by the players. At the beginning of every round each player may hold any quantity of coins, from zero to a maximum of three in their closed fist, extended into the circle of play. The coins may be of any denomination, and indeed the values of the coins are irrelevant: in fact, any suitable objects could be used in place of coins.
In general, the number "three" can be replaced with any other integer n ≥ 1, but all other rules are the same, except now each player chooses to hold any number 0, 1, ..., n of coins in hand.
For the first round an initial guesser is selected in some fashion. This first guesser has the initial advantage in that all possible sums are available for his guess, but also lacks insight into what the others might be holding, as indicated by their subsequent guesses. Play proceeds clockwise around the circle until each player has ventured a guess regarding the total number of coins, and no player can guess the same total as any other player. The call of "Spoof!" is sometimes used to mean "zero". After all players have made their guess, they open their fists and display their coins for the group to count the total. It is illegal to open your hand without calling out your guess. The player who has correctly guessed the total amount of coins is eliminated from the game and the remainder of the group proceeds to the next round. If no player guesses correctly, the entire group continues play in the next round. The starting guesser for each subsequent round is the next remaining player, clockwise from the starter of the previous round.
Play continues until all players have been eliminated except for one, whereupon that last remaining player pays the stipulated stakes to each other player. In some versions of the game additional rules such as "no gloating"; a leaving player is not allowed to celebrate, or left-handed play, are used.
The generalized (n-coin) two player version of this game was the subject of a paper in 1959. It was shown that for every n ≥ 1 this game is a "fair game", i.e. each player has a mixed strategy that guarantees their expected payout is at most zero to his or her opponent.
It also seems to be alive and well.
The original national UK Spoof Championship celebrates its 41st anniversary in 2015 in Cambridge on 16 October.
In July 2014, the Commonwealth Spoof Championships took place in Glasgow. The renewal is scheduled for the Golden Coast in 2018.