src/vs/base/common/strings.ts/count
export function count(value: string, character: string): number {
	let result = 0;
	const ch = character.charCodeAt(0);
	for (let i = value.length - 1; i >= 0; i--) {
		if (value.charCodeAt(i) === ch) {
			result++;
		}
	}
	return result;
}