My XML structure is something like this:
CODE
<people>
<person>
<name>Mary</name>
<sex>Yes please</sex>
<note>bring condoms, bring wine, wears expensive lingerie</note>
</person>
<person>
<name>Felli</name>
<sex>Yes please</sex>
<note>loli with a twist, mean eye</note>
</person>
<person>
<name>Helga</name>
<sex>Hell no</sex>
<note>Huge girth, needs eyebleach</note>
</person>
<person>
<name>Jenna</name>
<sex>Yes please</sex>
<note>bring wine, pornstar, blonde</note>
</person>
</people>
...
etc. etc.
<person>
<name>Mary</name>
<sex>Yes please</sex>
<note>bring condoms, bring wine, wears expensive lingerie</note>
</person>
<person>
<name>Felli</name>
<sex>Yes please</sex>
<note>loli with a twist, mean eye</note>
</person>
<person>
<name>Helga</name>
<sex>Hell no</sex>
<note>Huge girth, needs eyebleach</note>
</person>
<person>
<name>Jenna</name>
<sex>Yes please</sex>
<note>bring wine, pornstar, blonde</note>
</person>
</people>
...
etc. etc.
What I'm trying to do is to count (using XSLT count() function or any other suitable XSLT method) the number of persons with both the sex element containing "yes please" as well as the note element containing the words "bring wine". I have traversed the Intarwebs for months, steering asway from porn, searching high and low, and have found lots of would-be examples, just not the one I'm looking for. All my past efforts have produced incorrect results or a result of 0, so there's something I'm doing wrong - I just can't figure out what.