Please help with some fetch code

Please help with some fetch code

I am having trouble with the following code


if (Salesman[Name == input.Salesman].count()  <  10000)
{
    temp  =  Salesman  [Name == input.Salesman];
  
input.Salesman_s_Email = temp.Company_Email;
}


Gives the error

Error at line number : 1 at column 5 
In Criteria left expression is of type STRING and right expression is of type BIGINT and the operator == is not valid

but all the fields are strings

Please help