It sounds as if you should be able to define two connections to the two equivalent tables in your two databases and then use data blending to join them together. When you add results from the second data source Tableau will probably just automagically get the relationships right if both datasources have the same column names, so it should summarise by the same dimensions without you even having to do anything - but it does just pay to check the answers for a couple of examples.
Do I need to drag over the same fields into the worksheet, or just the Number of Records from the second database?
Should just be Number of Records. It will use the dimension names from the Primary connection as join keys for the blending relationship (since the names and data types match).
Or at least I think that's what should happen, I've never tried exactly what you are doing. Like I say, it pays to check one or two answers.