Nationalism is the identification with one's nation and support for its interests. Or the advocacy of, or support for the political independence of a nation or people. For example, nationalism is a way of thinking that says that some groups of humans, such as ethnic groups, should be free to rule themselves.
The three-fifths compromise was basically congress deeming that a slave was three fifths of a person. So I do believe that it is the first one: States representation in congress based on slave population