#include <stdio.h>
#include <string.h>

int main(void)
{
	int n, S;
	int r;
	int power[101];
	int i, j;
	int count;
	
	while (1){
		scanf("%d%d", &n, &S);
		if (n == 0 && S == 0){
			break;
		}
		
		memset(power, 0, sizeof(power));
		for (i = 0; i < n; i++){
			scanf("%d", &r);
			power[r]++;
		}
		
		count = 0;
		
		for (i = 1; i <= 100; i++){
			for (j = 1; j <= 100; j++){
				if ((i + j) > S){
					if (power[i] != 0 && power[j] != 0){
						if (i != j){
							count += (power[i] * power[j]);
						}
						else {
							count += (power[i] * (power[i] - 1));
						}
					}
				}
			}
		}
		printf("%d\n", count / 2);
	}
	return (0);
}