If your cohort, for a certain subject, all ended up with some awesome HSC exam marks, then your assessment marks (and therefore overall HSC mark) will be awesome too - because your assessment mark comes from the HSC exam marks, assigned according to internal ranking (i'm pretty sure that's how it goes?)
So yeah, logically, selective schools = more smart people, according to those selective school entry exams etc = better HSC marks in the end = better assessment marks, even if you're coming 10th or 20th etc = better overall HSC marks = school does count, in THAT way.
Then again, screwing up an assessment, in a selective school probably means a big drop in your internal rankings! Whereas, at a little unknown school, you might still be 1st internally, even with the screw up! And if you still ace your HSC exams, then you were better off at the little unknown school, than at the selective school - because otherwise, your HSC marks would have been assigned to someone else's assessment marks, rather than to your own!
So I guess school does count, but sometimes it can be an advantage being at a crappy school, as much as it might be an advantage to be at a top of the state selective school.
However, this talk of 'marks being pulled up' has occured - I do know of one case where, in my history extension class, me and some other guy were the only ones left at the end of the year. I ended up 1st internally, the other guy 2nd (obviously loll) and after the hsc, our marks for the exam were 49/50, and his 45/50. However, although my assessment mark was 49/50 (I came 1st, so I got the 1st best HSC exam result as my assessment mark), his wasn't 45/50 (as I would have expected, because he came 2nd, so he gets assigned the 2nd best HSC exam result as his assessment mark - which SHOULD have been 45/50). He ended up with an assessment mark of 48/50 instead. So I know that my mark must have pulled him up (not trying to boast or whatever, just giving a real-life example of marks actually being 'pulled up'). So yeah - if you have a smart cohort, then its possible that, during moderation, you won't just get assigned your HSC assessment marks according to rank, but they might be pulled up in the process also - as to whether they can be 'pulled down' as well, i've got no clue.
oh and btw - read one of those threads on 'HSC moderation' before you start asking me 'what the hell you on about???' - you might understand what I've written here better after you read up on moderation. In any case!
YOUR SCHOOL DOES COUNT. As to 'how' it counts, or how advantageous/disadvantageous it is... that really all depends on your circumstances.