#include<stdio.h>

#define MAX_CAT 100

int main(void){
	int i;
	int X,Y,W,H;
	int ncats;
	int insideCats = 0;

	scanf("%d%d%d%d", &X, &Y, &W, &H);
	scanf("%d", &ncats);

	for(i = 0; i < ncats; i++){
		int x, y;
		scanf("%d%d", &x, &y);
		if( (X <= x && x <= X + W) && (Y <= y && y <= Y + H) ){
			insideCats++;
		}
	}

	printf("%d\n", insideCats);

	return 0;
}