Fixed the function call that counts the number of results for a listing
of a directory. Right now the limit is 1000000.