// Slower C++ solution:
#include <cstdio>

#include <string.h>

#define INF 99999999

using namespace std;



typedef struct {

    int num;

    int time;

}node;

int n,l;

int dis[105][105],w[1005][1005];

int linker[1005],vis[1005];

node no[1005];



void floyd() {

    for(int k = 0;k < n;k++)

        for(int i = 0;i < n;i++)

            for(int j = 0;j < n;j++)

                if(dis[i][k] < INF &&

                   dis[k][j] < INF &&

                   dis[i][j] > dis[i][k] + dis[k][j])

                   dis[i][j] = dis[i][k] + dis[k][j];

}



bool dfs(int u) {

    for(int v = 1;v <= l;v++)

        if(w[u][v] && !vis[v]) {

            vis[v] = 1;

            if(linker[v] == -1 || dfs(linker[v])) {

                linker[v] = u;

                return true;

            }

        }

    return false;

}



int hungary() {

    int res = 0;

    memset(linker,-1,sizeof(linker));

    for(int u = 1;u <= l;u++) {

        memset(vis,0,sizeof(vis));

        if(dfs(u)) res++;

    }

    return res;

}



int main() {

    int m;

    //freopen("test.in","r",stdin);

    while(~scanf("%d%d%d",&n,&m,&l) && (n + m + l)) {

        memset(w,0,sizeof(w));

        for(int i = 0;i < n;i++)

            for(int j = 0;j < n;j++) {

                dis[i][j] = INF;

                if(i == j) dis[i][j] = 0;

            }





        while(m--) {

            int a,b,val;

            scanf("%d%d%d",&a,&b,&val);

            dis[a][b] = val;

            dis[b][a] = val;

        }



        floyd();



        for(int i = 1;i <= l;i++)

            scanf("%d%d",&no[i].num,&no[i].time);



        for(int i = 1;i <= l;i++)

            for(int j = 1;j <= l;j++) {

            if(i == j) continue;

            int f = no[i].num,t = no[j].num;

            int ft = no[i].time,tt = no[j].time;

            if(ft + dis[f][t] <= tt) w[i][j] = 1;

        }



        printf("%d\n",l - hungary());

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 11.326135047908247x):
#include<iostream>

#include<queue>

#include<stack>

#include<vector>

#include<set>

#include<math.h>

#include<string.h>

#include<stdlib.h>

#include<stdio.h>

#include<string>

#include<map>

#include<algorithm>

#include<sstream>

using namespace std;

#define maxn 2050

int V;                 

vector<int> G[maxn];  

int match[maxn];  

bool used[maxn];

#define  MAX_N 100

#define  MAX_L 1000

#define  INF 0x3f3f3f3f

int dis[MAX_N][MAX_N];

int p[MAX_L], t[MAX_L];  

void add_edge(int u, int v){

	G[u].push_back(v);

	G[v].push_back(u);

}

 

// 通?DFS?找?广路

bool dfs(int v){

	used[v] = true;

	for (vector<int>::iterator it = G[v].begin(); it != G[v].end(); ++it)

	{

		int u = *it, w = match[u];

		if (w < 0 || !used[w] && dfs(w))

		{

			match[v] = u;

			match[u] = v;

			return true;

		}

	}

 

	return false;

}

int bipartite_matching(){

	int res = 0;

	memset(match, -1, sizeof(match));

	for (int v = 0; v < V; ++v)

	{

		if (match[v] < 0)

		{

			memset(used, 0, sizeof(used));

			if (dfs(v))

			{

				++res;

			}

		}

	}

 

	return res;

}

 

void clear(){

	for (int i = 0; i < V; ++i){

		G[i].clear();

	}

}	

int main(){

	int N, M, L;

	int i,j,k;

	while (~scanf("%d%d%d", &N, &M, &L)){

		if(N==0&&M==0&&L==0) break;

		V = L * 2;

		clear();

		memset(dis, INF, sizeof(dis));

 

		for (i= 0; i< M; ++i){

			int u, v, d;

			scanf("%d%d%d", &u, &v, &d);

			dis[u][v] = dis[v][u] = d;

		}

 

		for (i = 0; i < L; ++i)

		{

			scanf("%d%d", p + i, t + i);

		}

 

		for (k = 0; k < N; ++k) {

			dis[k][k] = 0;

			for (i = 0; i < N; ++i) {

				for (j = 0; j < N; ++j) {

					dis[i][j] = min(dis[i][j], dis[i][k] + dis[k][j]);

				}

			}

		}

 

		for (i = 0; i < L; ++i) {

			for (j = 0; j < L; ++j)  {

				if (i != j && t[i] + dis[p[i]][p[j]] <= t[j]){

					add_edge(2 * i, 2 * j + 1);	

				}

			}

		}

		printf("%d\n", L - bipartite_matching());

	}

	return 0;

}