I cannot figure out what the problem with this is. It is supposed to count the number of e's in a sentence but it keeps going into infinite loops every time I try to run it.

public class wordStuff
{
public static int countEs(String sent)
{
int numE=0;
int oneUPe=0;

while(sent.substring(oneUPe,sent.length()).indexOf ("e")>=0)
{
numE++;
oneUPe=sent.substring(oneUPe,sent.length()).indexO f("e")+1;
}
return numE;
}
public static void main(String []args)
{
System.out.print(countEs("cheese"));
}
}