I am not sure whether my suggestions any way solves your problem or not but check if these helps. First of all, if you want a single counter to be incremented on any of the match then why not this-
if ((dt3.Rows[0][9].ToString()) == s || (dt3.Rows[0][15].ToString() == s2) || (dt3.Rows[0][20].ToString() == s3) || (dt3.Rows[0][25].ToString() == s4))
{
count ++;
}
This piece of code yields same result as that of your 4 sets of if..else statements.
Secondly, it is not a good practice to access value from data table columns by index. It would be more readable and less error-prone if you access them by their column names like
dt3.Rows[0]["columnName"].ToString();
Also, you haven't checked if the data table contains any rows or not, which may lead to exception. Make sure that you have put check before all these operations.
if(dt3.Rows.Count>0)
{
}
These are just suggestion for building better code and may not solve your problem but can help you identify your problem easier than earlier.