Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I assumed this would be an easy thing to do. I'm loading a point shapefile into a map like this:

layer = arcpy.mapping.Layer(file_name)

Is there a way to get the number of points in the shapefile? I see using the 'Describe' command that I can get some info about things... For instance,


Gives me some info about the fields in the underlying table but I can't count the rows.

share|improve this question

1 Answer 1

up vote 13 down vote accepted

Try arcpy.GetCount_management(layer): here's the documentation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.