I'm trying to get the below required output in python

Input:

```
S.No      Name         Marks     
1        Jack           85       
2        Ram            75       
3        Jack           86
4        Ann            90

```

Required Output:

```
S.No      Name         Marks     Count     
1        Jack           85       2
2        Ram            75       1
3        Jack           86       2
4        Ann            90       1

```

i tried the below code to add the count column which is similar to excel workings using countif function
'''

```
data['count']=data['Name'].value_counts()

```

'''
this code gives the below output

```
S.No      Name         Marks     Count     
1        Jack           85       NaN
2        Ram            75       NaN
3        Jack           86       NaN
4        Ann            90       NaN

```

I'm not sure what is missing, Can someone help me in this?
Really appreciate your help.