Count how many times an integer occurs within a linked list