In its structure central iodine has seven outer electrons and gets one from each of the bonded two iodines and there is another to provide the charge of 1 minus. This makes 7 + 2 +1 = 10 altogether, or five pairs.
These electron pairs will organise to minimise the repulsion as a trigonal bipyramidal structure.
However, only two pairs are used for bonding and three lone pairs. The lone pairs experience the greater repulsive effects and so will organise to be in the positions of the trigonal bipyramidal shape so as to minimise repulsions. These positions are two of the trigonal plane and one of the axial positions, distorting them appropriately.
Hence number of lone pair is 3