Just giving the algorithm of the problem as it is very simple -

- Initialize count as zero.
- Loop through each element of linked list:

a) If element data is equal to the passed number then

increment the count. - Return count.

+3 votes

Write a function that counts the number of times a given int occurs in a Linked List?

...