Do we have any record of the number of black people who immigrated to the US outside the confines of slavery during the time it was practiced?
To answer your first question: We have census records of free blacks living within the slave states. They were most common in the Upper South, to the point where they vastly outnumbered enslaved blacks in Delaware and were about even with them in Maryland. They become less common as one goes into the Cotton Kingdom, but there are significant and sometimes quite prosperous communities of free blacks who often just happened to look a lot like some of the richer white planters in and around New Orleans, Charleston, and a few other relatively big cities in the Lower South. In New Orleans, and to a lesser extent Mobile and Natchez, some of the well-off free blacks hail back to a less rigid system of racial control which operated in the Spanish and French empires, both from just having themselves or ancestors around in the right place and time or by immigration to the US.
Which brings us to your second question. There are at least some free people of color who came to the Southern United States from elsewhere during slavery. (I don't know an exact number, sorry.) There's always room for exceptions, but most of them hail from the Haitian diaspora and settled down (often with their slaves) mostly in Louisiana and other gulf ports or Charleston, SC. They brought with them tales of atrocities committed in the course of the Haitian Revolution which helped stoke white southern fears of a great slave insurrection. (Whites fleeing Haiti were no slouches in that department either.) Right up until the Civil War, Haiti was the ultimate example of how emancipation was impossible and could only end in something like genocide.