Function to add (or increment count if already added) search term to terms table