A friend once called me asking whether "number of casualties" is singular or plural. Apparently the words had been uttered by a reporter and there had been some debate at the friend's house as to whether the reporter had got the agreement between the verb and subject correct.
My intuition was that the following are both grammatical:
and that a with was and the with were would both be ungrammatical.
Thinking about it some more, I came up with another example pair.
That made things a little clearer to me (although looking back at the original pair, it's now obvious there too). With the indefinite article a, the heads of the phrases are casualties and people (both plural) whereas with the definite article the, the heads of the phrases are both number (singular).
In "a number of casualties were reported", it's the casualties that were reported; in "the number of casualties was reported", it's the number that was reported.
Even more clearly, in "a number of people were high", it's the people that were high; in "the number of people was high", it's the number that was high.
That would all suggest structures along the lines of:
The structure explains the subject-verb agreement and the semantics.
The interesting question in my mind remains: what it is about the article that determines which structure is licensed in each case?