create a resultsObj to encapsulate the totalAttempts and totalSuccesses properties for the purpose of encoding and decoding a particular object.
Implement the functionality to write the encoded resultsObj to a file and decode the resultsObj from a file.  Only updates the file on navigate to background now.