C++ Program to Count The Number of Objects a File