The version 6 of G-Truc Creation was a great opportunity for to refresh my knowledge of XSLT and XPath.
It's amazing how these two languages are powerfull, a good solution always end up with few code.
Select $Count first elements of $Post which contains a child element 'tag' which value contains the string-value 'gtc-tech-comment'.
In my real code I prefer to use variable as much as I can so that for example 'gtc-tech-comment' would be replace by one. When an XPath expression is too long I would cut it in several parts. Here $Post[./tag[contains(., 'gtc-tech-comment')]] could be place in a variable. It will also make the code easier to understand in lot of case.
An example of XML code where this XPath code can be applied. $Post is a variable that contains all the 'post' element.
The result of this query is a set of 2 elements: 'post' elements from line 1 and 5 for every value of $Count greater than 1.