NumInteriorRings(poly)

Returns the number of interior rings in the Polygon value poly. If the
argument is NULL or an empty geometry, the return value is NULL.

URL: http://dev.mysql.com/doc/refman/5.5/en/gis-polygon-property-functions.html

