I feel like there is a better way to read the newline and count it instead of using .get(), but im not sure