reads user input and stores in array

returns size of array