code: def count_authors() -> int:
      """Count authors in names.rst."""
      nb_authors = 0
      with open(names_rst(), encoding="utf8") as f:
          # count authors
          lines = f.readlines()
          for line in lines:
              if line.startswith(".. _"):
                  nb_authors += 1
      return nb_authors
  
file_path: nilearn/maint_tools/citation_cff_maint.py
imports: from __future__ import annotations
  from pathlib import Path
  from typing import Any
  import ruamel.yaml
label_desc: Use image node_id 13 for calling a global function with example usage: count_authors() and returns: nb_authors