I am trying to replace the lens cap for my Olympus 14-45mm f/3.5-5.6 Zuiko Digital but I'm very confused on which one I can buy. I am not sure what number I use for the size I need to have.
Spring-loaded lens caps are designed to grip the filter threads on the lens (or a filter if you have one attached) from the inside. As such, the cap size you need will be the same as the filter diameter. (Note that the filter diameter has nothing to do with the focal length(s) of the lens, which is also measured in millimeters.)
Some lenses have a diameter marking (e.g., "⌀ 77 mm") printed on the barrel or the ring that retains the front element. If there isn't one and you can't find the specifications for your lens, measure the diameter across the filter threads. The most common sizes are 49, 52, 55, 58, 62, 67, 72 and 77 mm; the size closest to your measurement is the one you want.
The spec sheet linked in the question says 58 mm, so any 58 mm lens cap will work just fine.