From the Super Mario Wiki
Coincentration is a Super Mario 64 DS minigame in which Wario punches a Moneybag and coins fall out of the sky into Brick Blocks. It later appears in New Super Mario Bros. as a multiplayer and single player Puzzle minigame. Its name is a portmanteau of "coin" and "concentration". This minigame is based on the game Minesweeper.
With the stylus, the player must tap the bricks in which the coins fall. If the player taps a brick that has no coins, the game will end. The highest score that the player can obtain in this game is 40, which is the "Perfect" score. In the multiplayer version in New Super Mario Bros., the same thing happens, but each player takes turns choosing a block. If a player taps a block with no coins, the block will break, and the player will lose two coins (can go below zero). Once all the coins are found, the person with the most coins wins.
 In-game instructions
Pay attention to where the falling coins land. Touch the blocks to retrieve the coins. But if you choose the wrong block, your game will end.