MainWindow: Make sure the filters are applied before getting the row num

First apply the new filter values and only when that is done get the
number of rows in the current view. This fixes the issue that, when
changing a filter, the number of rows shown under the table view is that
of the last results, not the current.

See issue #122.