Middle English: from Old French nombre (noun), nombrer (verb), from Latin numerus
The construction the number of + plural noun is used with a singular verb (as in the number of people affected remains small). Thus it is the noun number rather than the noun people that is taken to agree with the verb (and is therefore functioning as the head noun). By contrast, the apparently similar construction a number of + plural noun is used with a plural verb (as in a number of people remain to be contacted). In this case, it is the noun people that acts as the head noun and with which the verb agrees. In the latter case, a number of works as if it were a single word, such as some or several. See also collective noun (usage) and lot.