maintain child count when insert/append/detach