def count_cells(notebook):
    """
    The function takes a notebook and returns the number of cells

        Args:
            notebook(Notebook): python object representing the notebook
        Returns:
            len(nb_dict["cells"]): integer value representing the number of cells into the notebook

        A way you might use me is

        cells_count = count_cells(nb)
    """
    nb_dict = notebook.nb_dict
    return len(nb_dict["cells"])