SELECT COUNT(*) FROM node_access WHERE nid = 0 AND ((gid = 0 AND realm = 'all') OR (gid = 1 AND realm = 'content_access_author') OR (gid = 2 AND realm = 'content_access_rid') OR (gid = 2 AND realm = 'node_privacy_byrole_role') OR (gid = 1 AND realm = 'node_privacy_byrole_user')) AND grant_view >= 1
SELECT COUNT(*) FROM {node_access} WHERE nid = 0 AND ((gid = 0 AND realm = 'all') OR (gid = 2 AND realm = 'node_privacy_byrole_role') OR (gid = 1 AND realm = 'node_privacy_byrole_user')) AND grant_view >= 1