how to override a table's cardinality or statistics histogram I remember reading once that it is possible to force SQL Server to assume a table is a certain size, or perhaps even override a statistics histogram, when compiling a query.  Can someone explain how to do that, if it's possible?

To be clear: the purpose of this is to do what-if scenario analysis, outside of production, when writing queries.  I am not talking about modifying the query itself or using query hints.  (Examples of modifying the query and using query hints can be found in the answers to this question.)
You can use the UPDATE STATISTICS  WITH ROWCOUNT and PAGECOUNT option 

See here some examples :
 https://www.mssqltips.com/sqlservertip/2870/using-with-rowcount-and-pagecount-option-of-sql-server-update-statistics/
or
https://sqlsunday.com/2016/02/27/update-statistics-with-rowcount/