Bulk assign posts to a category using SQL (MySQL)

OK, I think I found the answer myself… As stated in the post I linked to:

wp_term_taxonomy – defines the taxonomy – either tag, category, or custom taxonomy

term_taxonomy_id bigint(20) unsigned NOT NULL auto_increment,
term_id bigint(20) unsigned NOT NULL default 0,
taxonomy varchar(32) NOT NULL default '',
description longtext NOT NULL,
parent bigint(20) unsigned NOT NULL default 0,
count bigint(20) NOT NULL default 0,
PRIMARY KEY  (term_taxonomy_id),
UNIQUE KEY term_id_taxonomy (term_id,taxonomy),
KEY taxonomy (taxonomy)

Note

count bigint(20) NOT NULL default 0,

which the OP describes as

  • count tracks how many objects are associated with the term+taxonomy pair. For example, given a term of the category taxonomy, count tracks how many posts are in that specific category.

So… the # of posts displayed in the UI is not dynamically determined but rather read from this table.