def filter_on_min_count(reads, min_count):
    """ Given a reads data frame, compute the number of times that each
        transcript ID occurs per dataset.
        Keep the rows that meet the min_count threshold and return them. """

    cols = ['gene_ID', 'transcript_ID', 'dataset']
    
    counts_df = reads[cols].groupby(cols).size()
    counts_df = counts_df.reset_index()
    counts_df.columns = cols + ["count"]

    filtered = counts_df.loc[counts_df['count'] >= min_count]
    return filtered