Discuss the below:
Q: Develop an application that counts the number of words, number of characters with spaces and without spaced. The program should display the text file statistics as follows:
File Name: sample.txt
Number of Words: 124
Number of characters without spaces: 1045
Number of characters with spaces: 1200