def get_children_count(cur, node):
    """
    Get amount of immediate children.

    :param node: Node
    :type node: Node or uuid4
    """
    sql = """
      SELECT
        COUNT(*)
      FROM
        nodes
      WHERE
        parent=%s;
    """
    cur.execute(sql, (str(node),))
    result = cur.fetchone()
    return result['count']
