def getCounts(IDandRatingsTuple):
    """ Calculate average rating
    Args:
        IDandRatingsTuple: a single tuple of (MovieID, (Rating1, Rating2, Rating3, ...))
    Returns:
        tuple: a tuple of (MovieID, number of ratings)
    """
    return (IDandRatingsTuple[0], len(IDandRatingsTuple[1]))