Get a number of columns in the table.
table_name (str) – table name
selected (bool) – consider only selected columns
int
number of columns
ValueError – if the table name is invalid