Is there a way to get the total count of features in a single service with python?
The Query operation is performed on a feature service resource. The result of this operation is either a feature set for each layer in the query or a count of features for each layer (if returnCountOnly is set to true) or an array of feature IDs for each layer in the query (if returnIdsOnly is set to true).
I did a quick test, with returnCountOnly set to true and using a where "1=1". It returned a count.
URL = "https://services.arcgis.com/xxxxx/arcgis/rest/services/myFeature/FeatureServer/0/query"
query_dict = {
"where" : "1=1",
"returnCountOnly" : "true",
"returnGeometry" : "false",
"f": "json", "token": token['token'] }
jsonResponse = urllib.urlopen(URL, urllib.urlencode(query_dict))
response = json.loads(jsonResponse.read())
print response
# prints: {u'count': 486, u'serverGens': {u'serverGen': 461482, u'minServerGen': 65364}}
If you are using the Python API, see: arcgis.features.FeatureLayer.query
and use return_count_only=True