Henry L. Gates on PBS points out there were 50 ethnic groups in the enslaved people brought to US.
From other reading I know Africa has more ethnic diversity than the other continents; I believe much more than the other continents put together. That means if history had worked out differently we might now be discussing 10 races, 8 of which were African and 2 of which covered the rest of the world.
I think ethnic diversity maps to some genetic diversity, although not on a one to one basis. But the key for most discussions is what I'd call "social diversity", meaning the way one's culture/society identifies ethnic/identity groups. For example, in the US we lump Hispanics/Latinos together, sometimes differentiating white as a separate group, but lumping in groups which are relatively unchanged since before Columbus.
We're now in the process of redefining "Orientals" as "Asians". (Meanwhile, in Britain "Pakistanis" seem to be a separate ethnic group.)
In the colonies and early national period enslavers knew different African ethnicities, and thought there were cultural differences (perhaps physical as well). Some were valued more than others. We--the US--created "African-Americans", partly by the process of intermarriage among African ethnicities and mostly because that's the way we deal with diversity--we can't handle a multitude so we stereotype until we get down to a manageable number.