Find minimum number of columns that identify uniqely all rows
It isn't reasonable to try to do this. I'm going to assume there is no existing primary key / unique constraints existing already. The problems with this approach are:


Data can change at any time. If you found a unique set of values, there is no guaranteeing that they will remain unique
Analyzing the data to find this could be extremely costly from a time/resources perspective and would require extensive customization for each specific table. 
Figuring out how many columns actually make up the key by their values is extremely hard (you'd probably have to take a brute force approach) as you can add any x number of columns to a key and still have unique values when looking at them as a set. 


In some cases there may be something obvious, like an ID column, which is probably a primary key candidate. However, if no primary keys or unique constraints are defined, it is always best to double check with a data owner / steward. 

In most cases, context, the business, and/or requirements will define what unique keys are. It is not something I'd ever advise inferring just from the data unless you are extremely familiar with the data domain and even then you should refer to a subject matter expert to validate.