def count_ontarget_samples(df, human_readable=False):
    """
    Function to count usable samples.

    Parameters
    ----------
    df: DataFrame

    human_readable: Boolean, optional
        default=False

    Returns
    -------
    ontarget_counts: DataFrame
        MultiIndexed if human_readable, otherwise
        "step" by "participant"
    """
    ontarget_counts = df[
        (df["ontarget"]==True)
    ][
        ["step", "target", "participant", "ontarget"]
    ].groupby(
        ["step", "target", "participant"]
    ).count().unstack(fill_value=0)
    if human_readable:
        return(ontarget_counts)
    ontarget_counts.set_index(
        ontarget_counts.index.droplevel("target"),
        inplace=True
    )
    ontarget_counts.columns = ontarget_counts.columns.droplevel()
    return(ontarget_counts)