added counter to show total number of combinations tested