adds function to calculate size of a linked list, updates stack.c to use size()