This will iterate only over the last chunk since the name of the last
        chunk indicates how many lines in total exist in all other chunks

def numKeys(self) -> int:
        """
        This will iterate only over the last chunk since the name of the last
        chunk indicates how many lines in total exist in all other chunks
        """
        chunks = self._listChunks()
        num_chunks = len(chunks)
        if num_chunks == 0:
            return 0
        count = (num_chunks-1)*self.chunkSize
        last_chunk = self._openChunk(chunks[-1])
        count += sum(1 for _ in last_chunk._lines())
        last_chunk.close()
        return count