I take it you want this to be optimised and not use a whole bunch of conditions inside channel entries loops.
In that case, MySQL queries are your best bet here, IMHO. I would take the plugin route and create a plugin returning an array of entry_id and accepting the various parameters you need.
For example, you could create a plugin returning the entry_id of the entries having a matrix field with more than x entries. Such a plugin would be based on the following type of query:
SELECT DISTINCT `entry_id` FROM `exp_matrix_data` WHERE `field_id` = 48 GROUP BY `entry_id` HAVING COUNT(`entry_id`) > 2
You plugin tag would could easily pass it a parameter called nbr_matrix_rows with a value of x.