怎么计算下列相同ID的个数,求教! 例如“010104101002”一共有4个。求教命令!
* Example generated by -dataex-. To install: ssc install dataex
clear
input str12 ID
"010104101002"
"010104101002"
"010104101002"
"010104101002"
"010104102001"
"010104102001"
"010104102001"
"010104103002"
"010104103002"
"010104103002"
"010104104001"
"010104104001"
"010104105002"
"010104105002"
"010104105002"
"010104106001"
"010104106001"
"010104107002"
"010104107002"
"010104107002"
"010104108002"
"010104108002"
"010104109002"
"010104109002"
"010104110001"
"010104110001"
"010104110001"
"010104111001"
"010104111001"
"010104111001"
"010104111001"
"010104112001"
"010104112001"
"010104112001"
"010104113001"
"010104113001"
"010104113001"
"010104113001"
"010104113001"
"010104114001"
"010104114001"
"010104114001"
"010104115002"
"010104115002"
"010104116001"
"010104116001"
"010104117002"
"010104117002"
"010104117002"
"010104117002"
"010104117002"
"010104118001"
"010104118001"
"010104118001"
"010104118001"
"010104118001"
"010104118001"
"010104119001"
"010104119001"
"010104119001"
"010104120002"
"010104120002"
"010104120002"
"010104120002"
"010104121002"
"010104121002"
"010104121002"
"010104122002"
"010104122002"
"010104122002"
"010104122002"
"010104123001"
"010104123001"
"010104124002"
"010104124002"
"010104124002"
"010104124002"
"010104124002"
"010104125002"
"010104125002"
"010104127002"
"010104127002"
"010104127002"
"010104128002"
"010104128002"
"010104128002"
"010104129002"
"010104129002"
"010104129002"
"010104129002"
"010104130001"
"010104130001"
"010104130001"
"010104201002"
"010104201002"
"010104205002"
"010104205002"
"010104205002"
"010104205002"
"010104206002"
end
[/CODE]