Added error count for IntentData (ONOS-1060)

Change-Id: Ida6313603c15fb6c1c1793c298206587b370a13e
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
index bc7e405..70f4c85 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
@@ -448,6 +448,7 @@
                     log.warn("Failed installation: {} {} on {}",
                              installData.key(), installData.intent(), ops);
                     installData.setState(CORRUPT);
+                    installData.incrementErrorCount();
                     store.write(installData);
                 }
                 // if toUninstall was cause of error, then CORRUPT (another job will clean this up)
@@ -456,6 +457,7 @@
                     log.warn("Failed withdrawal: {} {} on {}",
                              uninstallData.key(), uninstallData.intent(), ops);
                     uninstallData.setState(CORRUPT);
+                    uninstallData.incrementErrorCount();
                     store.write(uninstallData);
                 }
             }