n, m, q = list(map(int, input().split()))



A = [[0]*n for i in range(n)]



for i in range(m):

    l, r = list(map(int, input().split()))

    l, r = l-1, r-1

    A[l][r] += 1



#print(A)



s = [[0]*(n+1) for _ in range(n+1)]

for i in range(n):

  for j in range(n):

    s[i+1][j+1] = s[i+1][j] + s[i][j+1] - s[i][j] + A[i][j]



#print(s)



for i in range(q):

    p, q = list(map(int, input().split()))

    p, q = p-1, q-1

    ans = s[q+1][q+1] - s[p][q+1] - s[q+1][p] + s[p][p]

    print(ans)

import sys

import io, os

#input = sys.stdin.buffer.readline

input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline



n, m, Q = list(map(int, input().split()))

C = [[0]*n for _ in range(n)]

for i in range(m):

    l, r = list(map(int, input().split()))

    l, r = l-1, r-1

    C[l][r] += 1



s = [[0]*(n+1) for _ in range(n+1)]

for i in range(n):

    for j in range(n):

        s[i+1][j+1] = s[i+1][j] + s[i][j+1] - s[i][j] + C[i][j]



for i in range(Q):

    p, q = list(map(int, input().split()))

    p, q = p-1, q-1

    ans = s[q+1][q+1]-s[q+1][p]-s[p][q+1]+s[p][p]

    print(ans)

n, m, q = list(map(int, input().split()))
A = [[0] * n for i in range(n)]
for i in range(m):
    l, r = list(map(int, input().split()))
    l, r = l - 1, r - 1
    A[l][r] += 1
# print(A)
s = [[0] * (n + 1) for _ in range(n + 1)]
for i in range(n):
    for j in range(n):
        s[i + 1][j + 1] = s[i + 1][j] + s[i][j + 1] - s[i][j] + A[i][j]
# print(s)
for i in range(q):
    p, q = list(map(int, input().split()))
    p, q = p - 1, q - 1
    ans = s[q + 1][q + 1] - s[p][q + 1] - s[q + 1][p] + s[p][p]
    print(ans)

import sys
import io, os

# input = sys.stdin.buffer.readline
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
n, m, Q = list(map(int, input().split()))
C = [[0] * n for _ in range(n)]
for i in range(m):
    l, r = list(map(int, input().split()))
    l, r = l - 1, r - 1
    C[l][r] += 1
s = [[0] * (n + 1) for _ in range(n + 1)]
for i in range(n):
    for j in range(n):
        s[i + 1][j + 1] = s[i + 1][j] + s[i][j + 1] - s[i][j] + C[i][j]
for i in range(Q):
    p, q = list(map(int, input().split()))
    p, q = p - 1, q - 1
    ans = s[q + 1][q + 1] - s[q + 1][p] - s[p][q + 1] + s[p][p]
    print(ans)

-n, m, q = list(map(int, input().split())) -A = [[0] * n for i in range(n)] +import sys +import io, os + +# input = sys.stdin.buffer.readline +input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline +n, m, Q = list(map(int, input().split())) +C = [[0] * n for _ in range(n)] -    A[l][r] += 1 -# print(A) +    C[l][r] += 1 -        s[i + 1][j + 1] = s[i + 1][j] + s[i][j + 1] - s[i][j] + A[i][j] -# print(s) -for i in range(q): +        s[i + 1][j + 1] = s[i + 1][j] + s[i][j + 1] - s[i][j] + C[i][j] +for i in range(Q): -    ans = s[q + 1][q + 1] - s[p][q + 1] - s[q + 1][p] + s[p][p] +    ans = s[q + 1][q + 1] - s[q + 1][p] - s[p][q + 1] + s[p][p]