implemented stack.Size func