Looks like you need to read the file in order to get the pointer to move through it. Otherwise it will just count forever.