I\'m trying to write a simple method to count all the nodes in the linked list. I know there are 7 items in the linked list, but it is returning just 6 of them.
Her
Well that's because you are starting your count from 0, neglecting the first node.
Instead initialize count=1;
count=1