Get Count (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Returns the total number of rows for a feature class, table, or layer.
Usage tips
The row count returned by the tool will be displayed in the geoprocessing window.
If the input contains a selected set of records, only the selected records will be counted.
This tool can be used in ModelBuilder to set up a precondition as illustrated in the graphic below. Get Count is used to check the number of records returned by Select. If the record count is zero, then Buffer will not run.
Learn more about controlling the flow of processing in models
The environment settings do not affect this tool.
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 |
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 |
import arcgisscripting gp = arcgisscripting.create() gp.workspace = "D:/Workspace" count = gp.GetCount_management("roads")