Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Data Management toolbox > Table toolset > Tools

Get Count (Data Management)

Release 9.3
Last modified March 8, 2012
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

NOTE: This topic was updated for 9.3.1.


Returns the total number of rows for a feature class, table, or layer


Usage tips

Command line syntax
An overview of the Command Line window
GetCount_management <in_rows>

Parameter Explanation Data Type
<in_rows>

The input feature class, table, or layer used to determine the number of features for a geoprocessing operation

Table View | Raster Layer
Data types for geoprocessing tool parameters


Command line example

GetCount D:\workspace.mdb\roads

Scripting syntax
About getting started with writing geoprocessing scripts
GetCount_management (in_rows)

Parameter Explanation Data Type
in_rows (Required)

The input feature class, table, or layer used to determine the number of features for a geoprocessing operation

Table View | Raster Layer

Data types for geoprocessing tool parameters


Script example

# Using a 9.3-version geoprocessor
#
import arcgisscripting
gp = arcgisscripting.create(9.3)

gp.workspace = "D:/Workspace"
result = gp.GetCount_management("roads")
count = int(result.GetOutput(0))
# Using a 9.2-version geoprocessor
#
import arcgisscripting
gp = arcgisscripting.create()

gp.workspace = "D:/Workspace"
count = gp.GetCount_management("roads")

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.