// Initialize a number of cookies variable.
int numberOfCookies = 0;
// Check to see if the query is valid (there is at least one cookie).
if (countCookiesQuery.isValid())
{
// Initialize a number of cookies variable.
int numberOfCookies = 0;
// Check to see if the query is valid (there is at least one cookie).
if (countCookiesQuery.isValid())
{