The value in the XML for D_Payment_Amount_1 passed to the XSLT is a 401KL deduction amount. Each record may or may not pass a value. This sets the variable amount in the XSLT:
<xsl:variable name="counter3" select="Export/Record[ (D_Payment_Amount_1 > 0) ]"/>
I can't quite figure out what is being put into the variable since the select is T or F test. Further on in the code there is a test (<xsl:if test="count($counter3) > 0">).
I guess what's confusing me is the name of the variable, $counter3. If the data amount is greater than 0, is the amount being loaded into the variable or is a 1 (basically a count) being added?