def get_data_frequency(data, features):
    """
    Returns number of rows in `data` where the rows have value specified by `features`.

    Counts all rows where for which the column values corresponds those given in `features`.
    
    Parameters
    ----------
    data : numpy array
       N x D table of recorded occurrences
    features : dict of {int : int}
       Dictionary of (data_index : value) pairs
       Key is the feature index, and value is a truth value: 0 or 1.

    Returns
    -------
    int in [0,N]
       Number of samples with corresponding feature values.
    """
    return len([item for item in data if all(item[feature] == val for feature, val in features.items())])