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

        Args:
            notebook(Notebook): python object representing the notebook
        Returns:
            counter: integer value representing the number of code cells into the notebook

        A way you might use me is

        code_cell_count = count_code_cells(nb)
    """
    nb_dict = notebook.nb_dict
    counter = 0
    for cell in nb_dict["cells"]:
        if cell["cell_type"] == 'code':
            counter = counter + 1
    return counter