The logic is probably clearer with for-each:
<xsl:for-each select="Operation">
<xsl:sort select="@Priority" data-type="number"/>
<xsl:if test="position() > 4 and 21 > position()">
<xsl:apply-templates select="."/>
</xsl:if>
</xsl:for-each>
The above is XSLT 1.0, but I don't think there are major simplifications for 2.0.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference