src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.ts/arrayCount
function arrayCount<T>(array: Iterable<T>, predicate: (value: T) => boolean): number {
	let count = 0;
	for (const value of array) {
		if (predicate(value)) {
			count++;
		}
	}
	return count;
}