public class Verifier
{
    public static final String EXAMPLE_FILE = "example.txt";
    public static final Bag BAG_TYPE = new Bag("shiny gold");
    public static final int NUMBER_OF_BAGS = 4;

    public Verifier (boolean debug)
    {
        _debug = debug;
    }

    public final boolean verify ()
    {
        Rules theRules = new Rules(_debug);
        Inventory inv = theRules.parse(EXAMPLE_FILE);

        if (_debug)
            System.out.println("Loaded rules:\n\n"+inv);

        int count = inv.bagCount(BAG_TYPE);

        System.out.println("got "+count);
        
        if (count == NUMBER_OF_BAGS)
            return true;
        else
            return false;
    }

    private boolean _debug;
}
@@ -529,59 +529,8 @@
 );%0A%0A
-        System.out.println(%22got %22+count);%0A        %0A
     
@@ -600,16 +600,93 @@
    else%0A
+        %7B%0A            System.out.println(%22Invalid number of bags: %22+count);%0A%0A
         
@@ -703,16 +703,26 @@
  false;%0A
+        %7D%0A
     %7D%0A%0A 

Update Verifier.java