import mmap


def get_lines(file_path):
    """
        return an integer representing the number of lines
        in the given file
        :param file_path: Path to the given file
        :return: The number of lines in a file
    """
    with open(file_path, 'r+') as file:
        line_count = 0
        buffer = mmap.mmap(file.fileno(), 0)
        readline = buffer.readline
        while readline():
            line_count += 1
        return line_count