Attempt to call function get_child_count in base ‘null instance’ on a null instance.
This means you’re attempting to call a method on a node, but that node is actually not there, usually due to a wrong path. As you’re using get_parent, I can only imagine that you’re calling this method before the scene is added to the tree, e.g.:
root-node
var child_node = load("<PathToScene>").instance()
child_node.init()
add_child(child_node)
child-node
func init():
get_parent().get_child_count()
Great, thanks, the issue was to do with calling it too early.