Counter function

I guess you've written code which mistakenly tries to pass dataframes to functions called within a mutate.

I recommend you invest a short amount of time and effort and make a reprex (as I have been doing)