Count observations by group is always a good idea. With R, you can aggregate the the number of occurence with n().

For instance, the code below computes the number of years played by each player.

# count observations
data % > %
group_by(playerID) % > %
summarise(number_year = n()) % > %
arrange(desc(number_year))