Depends on the tiling of the board, but in general (like for a square tiling), you will have to compute the difference of the maximum and the minimum of the column/row index of all the elements in that region.
The ludeme to get the minimum/maximum is (results ...), then just a difference between these ones.