How to count successfully copy files source to target location with check directory in Linux?

Hi guys...please any one help me ....
how to copy files from source to target location
if 5 files copied successfully out of 10 files then implement success=10
and if remaining 5 files not copied successfully then count error=5
how to implement this condition with in loop

i need code linux shell script or putty terminal useful code