No, vim also only keeps part of the file loaded, however it will try to count how many lines the file has.