Welcome to the Java Forums!
Have a looksee at the
API regarding Vectors, if you haven't already... you can probably use one or a combination of the methods available for your task. Post you attempted code when you get stuck.
Worse case scenario, you could probably iterate through the list of elements while comparing each element and using a counter at the same time.
See you around!