update parse_line for readability
add count param to read_lines

Allow the caller to specify exactly how many lines they are expecting.
This will block if not enough lines come across.