You never want to do this. Your primary keys should be sacred. Once a primary key is associated with a record it should always identify that record.
If you want to know how many records are in your table do this:
select count(*) from table
Most databases optomize this search to be very fast, and you don't have to worry about there being bad entries.
Again I can't state it strongly enough "do not change your primary keys". Leave them alone.