Status of scanning pdf's

Hello All

                 currently working on pdf's data  extraction  ,i have  number of files in my folder .am successfully extracting them. my requirement is to show status/summary of how many files are successfully done extraction and how many files failed in the end of extraction

like
successfull:10
failed :2

Can any one help me out with this situation

Thanks
Pranay