Open the installation folder, typically C:\Program Files\Paradox Interactive\Europa Universalis III\history\provinces. Inside you'll find one file per province, and the ID number is right there in the list.
Note: don't edit anything in that folder unless you know what you're doing — changes will break the game's code.