def count_refs_in_mapping( references, mapping ):
    """Count the number of references in the mapping"""
    count = 0
    for r in references:
        if r in mapping:
            count += 1
    return count