Item Counter.
Assume that a file containing a series of names (as strings) is named names.dat and exists on the computer's disk. Design a program that stores the number of names stored in the file. (Hint: open the file and read every string stored in it.
Each time you read a string, increment a counter variable. When you have read all the strings from the file, the counter variable will contain the number of names stored in the file.)