When you have an object in your layout, you can create variables for these objects to store information for us that we can alter when we need to.
Say you had your pieces on the virtual board. When they overlap, you could destroy one and add a counter to the other to signify it has more than 1 piece on that square.
You could then have an event that says whenever that variable is greater than 1 to display the number (for the number you could use the text object - or just import some number images to use).
Hope that helps.