You can easily use :
len(df['name'].unique())
it will give how many unique value is in the name column.