calculate_trial_variance_count function

Calculate trial variance count