I have to following df:
Col1 Col2 test Something test2 Something test3 Something test Something test2 Something test5 Something
I can't get the other answers to work when I want to retain more columns than just the two columns Col1 and Col2. Below works well for me with any number of other columns retained.
df['Occur'] = df['Col1'].apply(lambda x: (df['Col1'] == x).sum())