Ah, yes, that was it! Yeah, you return the number of connections when the parent is invalid. Which in my case is always cause my list is flat and doesn't have a parent.

Thanks for all the help, I think I'm good to go for a bit!
Paul