# Copy current value of tag zCountShift into SecondValue variable.
SecondValue = currentValue.value
# Initialize Execute variable with zero value so it will be zero unless changed by following lines.
Execute = 0
# The next lines should not be indented like the code you posted, unless there was code cut out between them and the line above.
# If SecondValue is 58, set Execute to 1.
if SecondValue == 58: Execute = 1 #hour count
# If SecondValue is 57, set Execute to 2.
if SecondValue == 57: Execute = 2 #spoilage count inout
# If this is the initialChange for tag zCountShift, set Execute to 0.
if initialChange == 1: Execute = 0
= sets the variable before it to the value after it while
== compares the values before and after it for equality (results in True if they’re equal, and False if not).
This looks like code to choose different functions to execute at 57 (hour count) and 58 (spoilage count) seconds. It likely does nothing the rest of the time when Execute is zero. The last line prevents this from executing due to initial value change when tag comes online after saving changes, etc.