def extract_count_from_prediction(prediction):
    """
    Extract an integer count (0-20) from a prediction string or number.
    Returns None if extraction fails.
    """
    try:
        return text_to_int(prediction)
    except Exception:
        return None

    Extract an integer count (0-20) from a prediction string or number.
    Returns None if extraction fails.
    
vlmeval/dataset/utils/tallyqa.py