I am creating a custom geoprocessing tool and I only want it to run if at least 1 feature in a layer is selected. However when I use the GetCount tool if no features are selected it gives me the number of total features in the feature class. Using the simple code below will give me the result of 1,2,3 etc if that many features are selected but if none are selected I get 34 instead of 0.
Is there another tool or way to have it give me the result of 0 if no features are selected?
I basically want to tell my tool if result >= 1 run the rest of the code.
import arcpy
StormInlets = "StormInlet_Test"
result = arcpy.management.GetCount(StormInlets)
print(result)