The proof of this is simple classical application of the.inclusion/exclusion principle

Count the number of functions that leaveout of the image.at least one

How functions leaveout: .one member

How functions leaveout: .two members

But now you have counted some twice. So substract.

Etc

Then subtract that number from the total.