'Which country are you from? This is the polite form of the question. Also: 'Where are you from?
'What country are you from? Depending on the tone of voice, this can be impolite and confrontational. If someone is behaving in a strange way, and you are very surprised about this, you might ask "What country are you from? " It is not a polite way to confront someone.