This members-only tutorial provides the steps to define a custom function that takes in 3 arguments - post type, taxonomy and term and returns the number of published entries so we can use it in the PHP Function Return value options of Dynamic Data condition in Oxygen.
Sample Use Case: Output a Section only if there is at least 1 published post of a CPT (say, portfolio) for a given taxonomy (say, portfolio_category) and term (say, logos).