How many? Minesweeper help

If you want to use raycast, you would change the raycast starting location offset from the block. Though raycasting can be expensive if a lot of objects use them all the time all at once. I personally suggest using a list, like this: Making a 2D List