Yeah, but it's not simple. What it sounds like you want is a hashmap or hashtable. These are data structures where you can look up values based on arbitrary data types (like strings).
This would allow you to do something like:
Code:
my_hashtable* ht = create_ht();
ht_put("help", 2);
int value = ht_get("help");
The problem is that you need to implement the data structure yourself (or find an existing implementation online).
Of course you could go the easy route, and just do something like:
Code:
struct s
{
char string[100];
int num_duplicates;
};
// Now just create a linked list of these structures which tell you the string in
// question, and the number of duplicates