Overloaded method to save integers into shared preferences.