I have an XML file with information on movies. I want my expression to return the directors in the XML that have directed more than 1 movie.

What I have now is:

```
for $director in //director
where count($director) > 1
return $director 
This does not produce anything. 

```

What I'm trying to do is:

```
For every director in the XML: 
return director's name IF the director's name occurs more than once in //director

```

How would you solve this problem?

Sample of the XML:

```
<result>
    <videos>
        <video id="id1235AA0">
            <title>The Fugitive</title>
            <genre>action</genre>
            <rating>PG-13</rating>
            <summary>Tommy Lee Jones and Harrison Ford are the hunter and the hunted in this fast-paced story of a falsely convicted man who escapes to find his wife's true killer.</summary>
            <details>Harrison Ford and Tommy Lee Jones race through the breathless manhunt movie based on the classic TV series. Ford is prison escapee Dr. Richard Kimble, a Chicago surgeon falsely convicted of killing his wife and determined to prove his innocence by leading his pursuers to the one-armed man who actually commited the crime.</details>
            <year>1997</year>
            <director>Andrew Davis</director>
            <studio>Warner</studio>
            <user_rating>4</user_rating>
            <runtime>110</runtime>
            <actorRef>00000003</actorRef>
            <actorRef>00000006</actorRef>
            <vhs>13.99</vhs>
            <vhs_stock>206</vhs_stock>
            <dvd>14.99</dvd>
            <dvd_stock>125</dvd_stock>
            <beta>1.03</beta>
            <beta_stock>12</beta_stock>
            <LaserDisk>12.00</LaserDisk>
            <LaserDisk_stock>10</LaserDisk_stock>
        </video>
    </videos>
</result>

```