How to get my app to charge after 3 appends of collection view images

Ok so to break this down my one app is a name memory app and you click the little plus arrow in the top right to go to your photo library to select and image then it appears on the “yearbook view controller” now how could I make it only let one import 3 images before charging them to upload unlimited images to the “yearbook view controller” or collection