Q:

Adding together GetCount Results

Is there anyway to add together GetCount Results? I am using GetCount to find the number of selected features for multiple layers but when I try to add them all together I get an error message saying it is an unsupported operand type for +: 'Result' and 'Result'.
SampledFaild = arcpy.GetCount_management('SamplingFaild')
SampledValid = arcpy.GetCount_management('SamplingValid')
Total = SampledFaild + SampledValid

A:

As the error message indicates, the return value of GetCount_management is a Result object. The documentation for GetCount includes an example of how to extract the return value, by casting the Result.GetOutput() value to integer.
Rewriting your code to use Style Guide for Python (PEP 8) recommended leading lowercase variable names, the result is:
sampledFaild = arcpy.GetCount_management('SamplingFaild')
sampledValid = arcpy.GetCount_management('SamplingValid')
total = int(sampleFaild.getOutput(0)) + int(sampleValid.getOutput(0))

