## DataRepository.GetCount

### Description

Returns the number of items present in the scene matching the specified type.

### C# Syntax

    Object DataRepository.GetCount( Object in_varObject, siDataFilterType in_filterType );

### Scripting Syntax

    oInteger = DataRepository.GetCount( Object, [Filter] );

### Return Value

Integer

### Parameters

Parameter | Type | Description
--- | --- | ---
Object | Object or String | Object to count or string containing the CLSID of the object to count.
Filter | siDataFilterType | Specify if what kind of items should be filtered. Default Value: siAllData

### Examples

#### VBScript Example

    set oDatabase = XSIUtils.DataRepository

    set oSphere = CreatePrim( "Sphere", "MeshSurface" )

    ' Count the total number of 3D Objects in the scene

    Application.LogMessage oDatabase.GetCount( oSphere )

    CreatePrim "Sphere", "MeshSurface"

    set oSphereMesh = GetValue( "Sphere.polymsh.geom.sphere" )

    ' Count the number of spheres under the scene root

    Application.LogMessage oDatabase.GetCount( oSphereMesh, siSceneRootData )

    ' Expected result:

    'INFO : 25

    'INFO : 2