added count, remove, and exists functions