Method 1:
If you want to count the entry The Beatles in your Artist column from your DataFrame, you don't have to do a loop.
Use pandas.DataFrame.groupby instead, with .transform('count'). It will give you the count of each entry of your Artist column.
df['Count'] = df.groupby('Artist')['Artist'].transform('count')
Which gives:
>>> data = ['The Beatles', 'Some Artist', 'Some Artist', 'The Beatles','The Beatles','The Beatles']
>>> df = pd.DataFrame(data,columns = ['Artist'])
>>> df
Artist
0 The Beatles
1 Some Artist
2 Some Artist
3 The Beatles
4 The Beatles
5 The Beatles
>>> df['Count'] = df.groupby('Artist')['Artist'].transform('count')
>>> df
Artist Count
0 The Beatles 4
1 Some Artist 2
2 Some Artist 2
3 The Beatles 4
4 The Beatles 4
5 The Beatles 4
This is helpful if you want to graph your result. Just create a dictionary with keys equal to Artist column value and values equal to Count column value.
The repition won't be a problem since python dictionaries does not allow duplicated values on keys. Doing so:
>>> artist_count_dict = dict(zip(df['Artist'],df['Count']))
>>> artist_count_dict
{'The Beatles': 4, 'Some Artist': 2}
You may now access those values for your graphing purposes.
Method 2:
You can also use df['Column Name'].value_counts() to give you the stats you need.
>>> df['Artist'].value_counts()
The Beatles 4
Some Artist 2
Name: Artist, dtype: int64
Create a new dataframe if you need to store it into one:
>>> df2 = df['Artist'].value_counts()
>>> df2 = pd.DataFrame(df2)
>>> df2.index.name = 'Artist'
>>> df2.columns = ['Count']
>>> df2
Count
Artist
The Beatles 4
Some Artist 2
df['column'].value_counts(),df.query(),df.groupby(),df.filter(), or any of the other methods for selecting data from a dataframe. Looping is almost never the best option in pandas.