code: public boolean  trySetCount(VersionedValue<Integer> previous, int newCount) throws Exception
      {
          VersionedValue<byte[]> previousCopy = new VersionedValue<byte[]>(previous.getVersion(), toBytes(previous.getValue()));
          return sharedValue.trySetValue(previousCopy, toBytes(newCount));
      }
docs: Changes the shared count only if its value has not changed since the version specified by
  newCount. If the count has changed, the value is not set and this client's view of the
  value is updated. i.e. if the count is not successful you can get the updated value
  by calling {@link #getCount()}.
  
  @param newCount the new value to attempt
  @return true if the change attempt was successful, false if not. If the change
  was not successful, {@link #getCount()} will return the updated value
  @throws Exception ZK errors, interruptions, etc.