Your style sheet is trying to show variables that are not in the xml. Only <movie> is in the xml.
I also think it is trying to calculate the number one movie, and the number 2, 3, etc.. Not sure xsl or myself can do that.
If we take out the variables that are not in xml we get this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:key name="movies" match="poll" use="." />
<xsl:variable name="single-movie" select="//movie[generate-id(.) = generate-id(key('movies', .))]/."/>
<title>Top American Comedies</title>
<link href="comedy.css" rel="stylesheet" type="text/css"/>
<h2>The Top American Comedy Films</h2>
<p>Number of Ballots: <xsl:value-of select="count(poll/ballot/movie)"/></p>
It does show the first vote of all 162 ballots. And that is what it is suppose to do. Maybe we should look at this a little more and see if can get this working.