Map.Count (gb.map)

Property Read Count As Integer
Returns the number of Map Layers, both _MapShape and _MapLayer layers.