The number of pages you wrote has nothing to do with it. 5 pages is perfectly fine.
The teachers at my school always taught us to write essays that are 4-6 pages in length and engage with the terms of the question, talking about certain issues relating to one text while talking about different issues with a different text. Both the teachers who taught advanced have been HSC markers before and awarded high marks to essays 4-6 pages long. I know I wrote 3.5 pages in the trial for some of my essays and got 13/20s, the reason for my mark not being spectacular wasn't for lack of length, it was for inconsistent relation to the question.
I wrote 5.5, 4.5 and 5 pages for my essays today and think I went well this time.
Making a marker sift through 10 pages of you regurgitating everything you know isn't going to get you an good mark if you don't engage with the terms of the question, contrary to popular belief by some people out there.