This scalar Count(*) check determines whether a matching USER_PREFERENCE row already exists for the given application/user (and optional page name). It backs PreferenceData.DoesPrefExist, called from SavePreferences to decide whether to dispatch to UpdatePref or InsertPref.
-- Default form (no page name supplied)selectCount(*)fromUSER_PREFERENCEwhereUSER_ID=:useridandAPP_NAME=:appnameandPAGE_NAMEisNULL
-- When pageName is supplied, the final predicate is replaced with:selectCount(*)fromUSER_PREFERENCEwhereUSER_ID=:useridandAPP_NAME=:appnameandPAGE_NAME=:pagename