Bottle caps are used in the Battle Colosseum, where you use it as currency, similar to Heart Scales, and give it to the Hyper Trainer. Then, the Hyper Trainer which Pokemon you want to max out one of it's IVs. After you click on which IVs you want to maximize, the process is done.
Something else you can do with the Bottle Caps is waiting to get 5 of them, and making one of your Pokemon used for Battle Colosseum crush everything.
5 Is enough, considering you won't be using one of your stats as much. (Example: Timid Volcarona that uses special attacks)