I am running ols regressions with firms from different countries and different industries. I want to control for both country and industry membership of each firm. Say I have 1,...,N countries and 1,...,M industries. How many dummy variables do I need to avoid the dummy trap? I am using Matlab, so I have to manually set up all regressors.