I could not tell you why your version is not working, unless there are some unusual line breaks or other spurious characters that are creating an issue when comparing strings. (This could happen for example if a unix line ending or other unusual character was somehow in the string that you could not see)
I would try using the static Compare method for String where the true parameter will compare the string, ignoring case:
foreach (var item in myList)
{
if (String.Compare(myInput.Trim(), item.Trim(), true) == 0)
{
count++;
}
}
Updated: After reading the comments, Draken has suggested using the string Equals method.
foreach (var item in myList)
{
if (myInput.Trim().Equals(item.Trim(), StringComparison.OrdinalIgnoreCase))
{
count++;
}
}