Thanks for your post. There's no built-in support for this functionality, but you can use the JavaScript "Associative Array" feature (which behaves like a hashtable) to implement this with some Run Script actions.
I've mocked up a dummy project which emulates the kind of functionality you need. A JavaScript Associative Array object is created and stored in the FB Variable "FailureDictionary".
The dictionary counts the number of times each dummy project fails to build, and resets the failure count to zero any time a dummy project builds successfully.