There is probably a number moulded into the lens cap, possibly with a "ø" beside it. This number refers to the diameter of the cap and is the same as the ring size you need.
Failing that, go to your friendly local camera shop and ask them to find out for you. Repay their kindness (if they manage to help myou out!) by buying the ring from them.
It might also help if you said exactly which lens you were talking about - even a clue as to which system it's from (Canon, Nikon etc). (The Canon EF-S 10-22mm f/3.5-4.5 USM has a filter size of 77mm, according to their website.)