AnsweredAssumed Answered

Getting a count of the rows and having the output in a table using model builder and python

Question asked by Tilottama1179 on Sep 19, 2019
Latest reply on Sep 19, 2019 by Tilottama1179



I am running a model, and in the end I need to get a count of the rows, 'collect values' (model builder tool) and 'calculate values' (model builder tool) and get the output in a table. I am unable to do this. I am using the python code from this post arcgis desktop - Using ModeBuilder to populate a table with the feature count of multiple feature classes - Geographic I… , but running into an error with the python code block -


 def sum_counts(counts):         if counts.find(';') == -1:             if counts <> '#': return int(counts)             else: return 0         else:              return sum(map(int, counts.split(';')))

What am I doing wrong? How will I achieve getting a count of the rows and putting the output in a table.