
    Design a function for a social media recommendation engine that determines how many different user interaction groups (like communities, content categories, or interest groups) contain a specific user ID or content tag. This count will help assess the cross-category popularity of either a user or content type to improve recommendation accuracy.
    

    
def count_element_in_list(list1, x):
    """
    Design a function for a social media recommendation engine that determines how many different user interaction groups (like communities, content categories, or interest groups) contain a specific user ID or content tag. This count will help assess the cross-category popularity of either a user or content type to improve recommendation accuracy.
    

    """
def count_element_in_list(list1, x):
    """
    Design a function for a social media recommendation engine that determines how many different user interaction groups (like communities, content categories, or interest groups) contain a specific user ID or content tag. This count will help assess the cross-category popularity of either a user or content type to improve recommendation accuracy.
    

    """
    ctr = 0
    for i in range(len(list1)):
        if x in list1[i]:
            ctr += 1
    return ctr