Erreure: Expression must evaluate to a node-set

Voici où je créer la variable:

<xsl:variable name="permitRowCount" select="count(/root/permitRow)" />
<xsl:variable name="totalRows" select="$permitRowCount + ( ( ceiling( ( $permitRowCount - 3 ) / 5 ) ) * 5 ) - ( $permitRowCount - 3 ) "/>

Disons que dans cet exemple, $permitRowCount = 9.