I used the movie guide available in desktop. I am assuming it is the same data as in the class. I used this query. It returned a "A Few Good Men" with 12 actors.
match(a:Person)-[:ACTED_IN]->(m:Movie) with m, collect(a.name) as actors return m.title, actors, size(actors) as cnt order by cnt desc limit 1
Thanks @glilienfield for taking the time to investigate. Unfortunately the course Movie appears to be different to the alternative you tried since 'A Few Good Men' did not satisfy the verification step. I also got the answer 'Toy Story' from the course sandbox version so you seem to have confirmed my issue!
Looks like the course needs a fix!
I decided to take the course, as I have not taken this one yet and you got me curious. I got through the question. Here was my query. The answer was "Hamlet'
match(p:Person)-[:ACTED_IN]->(m) return m.title, size(collect(p.name)) as cnt order by cnt desc limit 1
I figured out the difference. In my original query I grouped on the Movie node 'm', which collects the actors for that specific movie. In the query above, I grouped on 'm.title', which collects that actors over all Movie nodes with the same title. As it turns out, there are six movie nodes with the same title of 'Hamlet', so all the actors across all the 'Hamlet' movies get collected. This is why there are 24 actors related to the movie title 'Hamlet'.