Returns the number of distinct geometries that constitute a composite geometry type (ST_GeomCollection, ST_MultiPoint, ST_MultiLineString, or ST_MultiPolygon).
Returns an INTEGER value.
ST_GeomCollection, ST_MultiPoint, ST_MultiLineString, and ST_MultiPolygon
SELECT skey
FROM sample_shapes
WHERE shape.ST_NumGeometries() < 4
ORDER BY skey;