### Function

# GObject type_get_instance_count

since: 2.44

#### Declaration

    int
    g_type_get_instance_count (
      GType type
    )

#### Description

Returns the number of instances allocated of the particular type; this is only available if GLib is built with debugging support and the `instance-count` debug flag is set (by setting the `GOBJECT_DEBUG` variable to include `instance-count`).

Available since: 2.44

#### Parameters

`type`

  Type: `GType`

  A `GType`.

#### Return value

Type: `int`

The number of instances allocated of the given type; if instance counts are not available, returns 0.