changed countUsers into a function called for each line
restructured into functions. countUserLines has been repurposed into a general purpose function for processing each line