Count files every hour

Hi,
I have a directory which uploads files every minute.I want to check the number of files uploaded for every one hour.
I want to run a cron every hour to chk this but iam hanged like how to write the script.

Like the script should count for one hr ie from 00:00 to 01:00 hrs then next hr when the cron is run shld chk for 01:00 to 02:00 hrs.
Can someone guide me to start writing this script.

Regards,
Nessj

I have added a basic script . You can modify it as per your requirement and add it to cron to execute every one hour.Let us know if you have any further querry.

lst_count=`cat last_count`
new_count=`ls /PATH | wc -l`


nofilesupload=`expr $new_count - $lst_count`
time=`date`
echo "At $time $nofilesupload new files uploaded with in last HOUR" >> logs.txt

ls /PATH | wc -l > last_count

This will fail at the first time since "last_count" file wont exists that time.

@nessj: Are you allowed to move files after each upload?

if yes, in that case, just count the files in upload_dir each hour and and then move the files to archive.

Just add a if condition to check the file last_count.

if [ -f last_count ]
then
#nothing to do
else
echo "0" >>last_count
fi