A reasonable solution could be the following:
while(gets(text)){
for(i = 0; i < strlen(text); i++)
{
if (text[i]=='=')
{
if(text[i+1]=='=')
continue;
if(text[i-1]=='<'||text[i-1]=='>'||text[i-1]=='!'||text[i-1]=='=')
continue;
count++;
}
}
EOF could be an option with scanf("%s", &text)!=EOF inside the while loop. Also note that the counter should be placed after the last if statement in order to check properly. Otherwise it will count != <= etc. operators all together with the simple "=".