Some words, such as 'number', have so many different meanings and uses that it's difficult to know and understand them all. However, I find it a good starting point to trawl through all the definitions, and see if you can find one that fits the bill/makes sense. In this case, the following seems to pretty much cover it (from TFD):
number
nUsage Note: As a collective noun number may take either a singular or a plural verb. It takes a singular verb when it is preceded by the definite article the:
The number of skilled workers is small. It takes a plural verb when preceded by the indefinite article a:
A number of the workers are unskilled.
======================================================================================================================
As to why this might be, although not a grammatical or etymological explanation, it seems to me that in the first case it is
the number that is the focus of the sentence. The sentence could be simplified to "
the number is small" and still make sense. Whereas in the second case, it is
the workers who are the focus of the sentence, and the simplified sentence would read "
the workers are unskilled". If you said "the workers are small" it would have an entirely different meaning!
======================================================================================================================
I think that the same goes for:
group
nUsage Note: Group as a collective noun can be followed by a singular or plural verb. It takes a singular verb when the persons or things that make up the group are considered collectively:
The dance group is ready for rehearsal. Group takes a plural verb when the persons or things that constitute it are considered individually:
The group were divided in their sympathies.
======================================================================================================================
So to sum up, it seems that in both cases if it is the
collective (number, group) that is the focus, a
singular verb is used and if it is
the individuals (workers, members of a group) that make up the collective are the focus, the
plural verb is used.
Just adding my two penn'orth to RuthP's excellent explanation above.
I would live all my life in nonchalance and insouciance, Were it not for making a living, which is rather a nouciance.
Ogden Nash