<xsl:template match="PartyList">
<xsl:value-of select="count(Party[Type='FRIEND'])"/>
</xsl:template>
There are a number of weaknesses in your code:
<xsl:for-each select='.'>
-- this is not wrong, but it's silly, because it does nothing
<xsl:call-template name='friend_test'>
<xsl:with-param name='test' select='.'/>
-- the context node is an implicit parameter to a named template, there's no need to make it an explicit parameter. Also, when supplying a node to a template, it's often better to make it a match template rather than a named template.
<xsl:template name='friend_test'>
<xsl:param name='test' select='.'/>
-- why declare a parameter that you don't use?
<xsl:value-of select='count([Type="FRIEND"])'/>
-- square brackets are always used to qualify something, you need to say what you are qualifying.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference