In this context I think it's impossible to say that number is the head of the Subject noun phrase a number of boys.
I don't have CGEL, but in Huddleston's precis (A Short Overview of English Syntax) he
- distinguishes a determinative (a class of word or phrase) from a
Determiner (a syntactic function) (3), and
- defines the Head of a noun phrase as a noun (7.1.b)
It would be consistent with these to say that number is the Head of the noun phrase a number of which acts as the Determiner of the Subject noun phrase a number of boys, thus:
[SUBJECT NOUN PHRASE [DETERMINER NOUN PHRASE Determiner a Head number ?? of] HEAD boys]
REVISED September 2015:
But it may be just a slip, or an improper revision of a passage which was originally something beginning "The number of boys", or any number of things.
I now have CGEL and find that it treats constructions of this sort at section 3.3 (pp. 349-50) under the heading Non-count quantificational nouns. In these expressions, where the "quantificational noun" (number in your example) is complemented by a preposition phrase of + "what we shall call the oblique" (boys in your example)
... the number of the whole NP depends on the oblique; we will say that [number] is number-transparent in that it allows the number of the oblique to percolate up to determine the number of the whole NP. [...] [I]t has been bleached of its original meaning and is a non-count noun [...] The of complement can be omitted in ellipsis, but it remains understood and continues to determine the number of the NP [...]
On pp. 351-2, under the heading "Syntactic structure of NPs like a number of protesters", CGEL contrasts the analysis I have given above with one which understands the quantificational noun as head of the NP:
[NP [Det a] [Head:Nom [Head:N number] [Comp:PP [Head:Prep of] [Comp:NP boys]]]]
CGEL gives fairly compelling syntactic reasons for preferring this analysis to mine.
I think there is something more to be said, but frankly I don't know what that something is. For the time being I think we have to take number as a head to which the construction imputes plurality.